diff options
Diffstat (limited to 'appendices')
-rw-r--r-- | appendices/devbook-guide/text.xml | 35 |
1 files changed, 20 insertions, 15 deletions
diff --git a/appendices/devbook-guide/text.xml b/appendices/devbook-guide/text.xml index 025a8b1..5ae077b 100644 --- a/appendices/devbook-guide/text.xml +++ b/appendices/devbook-guide/text.xml @@ -135,18 +135,20 @@ an example <c><body></c> element: <codesample lang="sgml"><!-- Example of a body element --> <p> -This is a paragraph. <path>/etc/passwd</path> is a file. +This is a paragraph. <c>/etc/passwd</c> is a file. <uri>https://forums.gentoo.org</uri> is my favorite website. -Type <c>ls</c> if you feel like it. I <e>really</e> want to go to sleep now. +Type <c>ls</c> if you feel like it. I <e>really</e> want to go to sleep now. </p> <pre> This is text output or code. -# <i>this is user input</i> +# this is user input +</pre> +<codesample lang="sgml"> Make HTML/XML easier to read by using selective emphasis: -<foo><i>bar</i></foo> -</pre> +&lt;foo&gt;bar&lt;/foo&gt; +</codesample> <note> This is a note. @@ -166,15 +168,17 @@ Now, here's how the <c><body></c> element above is rendered: </p> <p> -This is a paragraph. <c>/etc/passwd</c> is a file. +This is a paragraph. <c>/etc/passwd</c> is a file. <uri>https://forums.gentoo.org</uri> is my favorite web site. -Type <c>ls</c> if you feel like it. I <e>really</e> want to go to sleep now. +Type <c>ls</c> if you feel like it. I <e>really</e> want to go to sleep now. </p> -<codesample lang="sgml"><!-- Code Sample --> +<pre> This is text output or code. # this is user input +</pre> +<codesample lang="sgml"> Make HTML/XML easier to read by using selective emphasis: <foo>bar</foo> </codesample> @@ -199,21 +203,22 @@ This is important. <p> We introduced a lot of new tags in the previous section <d/> here's what you -need to know. The <c><p></c> (paragraph), <c><pre></c> (code block), -<c><note></c>, <c><warning></c> (warning) and -<c><important></c> (important) tags all can contain one or more lines of -text. Besides the <c><table></c>, <c><ul></c>, <c><ol></c> +need to know. The <c><p></c> (paragraph), <c><pre></c> +(preformatted block), <c><codesample></c> (code block), +<c><note></c>, <c><warning></c> and <c><important></c> tags +all can contain one or more lines of text. Besides the <c><figure></c>, +<c><table></c>, <c><ul></c>, <c><ol></c> and <c><dl></c> elements (which we'll cover in just a bit), these are the only tags that should appear immediately inside a <c><body></c> element. Another thing <d/> these tags <e>should not</e> be stacked <d/> in other words, don't put a <c><note></c> element inside a <c><p></c> element. As -you might guess, the <c><pre></c> element preserves its whitespace -exactly, making it well-suited for code excerpts: +you might guess, the <c><pre></c> and <c><codesample></c> elements +preserve their whitespace exactly, making them well-suited for code excerpts: </p> <codesample lang="sgml"><!-- Named <pre> --> <pre> -# <i>uptime</i> +# uptime 16:50:47 up 164 days, 2:06, 5 users, load average: 0.23, 0.20, 0.25 </pre> </codesample> |