In this chapter we'll look at a few ways of formatting your text.
Emphasized Text
<EM> is used to indicate
emphasized text. While it is often rendered identical to
<I>, italics, using
<EM> rather than
<I> is preferred.
<P>It allows the browser to distinguish
between <EM>emphasized text</EM>
and other text which can be drawn in <I>italics</I>.
It allows the browser to distinguish between emphasized text
and other text which can be drawn in italics.
Strongly Emphasized Text
<STRONG> is used to indicate
strongly emphasized text. While it is often rendered identical to
<B>, using
<STRONG> rather than <B>
is preferred.
<P>It allows the browser to distinguish
between <STRONG>strongly emphasized text</STRONG>
and other text which must be drawn in <B>boldface</B>.
It allows the browser to distinguish between strongly
emphasized text and other text which must be drawn in boldface.
Definition of a Term
<DFN> is used to mark up terms
which are used for the first time. These are often rendered in
italics so the user can see this is where the term is used for the first
time.
Code Fragments
<CODE> is used for snippets of
code which appear inside a paragraph of text. It is usually rendered
in a monospaced font.
The above sentence looks like this in HTML:
<P><CODE><CODE></CODE>
is used for snippets of code which appear inside a paragraph of text.
Sample Text
<SAMP> is used to indicate a
sample of text which should be used literally.
<P>The text <SAMP>General
Protection Fault</SAMP> is well known to Windows
users.
The text General Protection Fault is well known to Windows
users.
KBD
<KBD> is used for text
to be typed by the user. It is usually rendered in a monospaced
font.
Variable
<VAR> is used to mark up
variables, for example in discussions of computer programs. Using
this tag allows programs to automatically generate lists of the used
variables.
<P>The variable <VAR>c</VAR>
is used as a counter in this program.
The variable c is used as a counter in this program.
Short Citations
The <CITE> element indicates that
the text enclosed is cited from some reference. It could be rendered
with smart quotes, but usually browsers use italics.
<P><CITE>It could be rendered with smart
quotes, but usually browsers use italics.</CITE>
is cited from the above paragraph.
It could be rendered with smart quotes, but usually browsers use
italics. is cited from the above paragraph.
|