<DL>
,
<DT>
and <DD>
, often used to move text over from the left margin to
avoid collisions with left-border graphics, were actually intended for lists of defined terms, using
<DT>
and </DT>
to mark the term being defined, <DD>
and </DD>
to enclose the definition, and <DL>
and </DL>
to enclose the entire list of defined terms.
<H1>
tags are used for nothing more important than to make the word "Beware!" jump
off the page at you visually, this isn't going to be very helpful.
<STRONG>
and </STRONG>
tags instead of <B>
and </B>
tags. The former is
aimed at the content of the text, while the latter is only concerned with its visual appearance.
On the other hand, if all you want to do is make your text a bit heavier and there is no informational
implication involved, then use the bold tags instead.
<CITE>
and </CITE>
tags, for enclosing citations to
other works, <CODE>
and </CODE>
tags for enclosing
computer code displayed on a Web page, and <BLOCKQUOTE>
and
</BLOCKQUOTE>
tags for enclosing quotations from other works.
<CITE>
tag has the side
effect of displaying enclosed text in italics, it's much easier to use the <I>
tag, so this
tag is rarely abused. However,
the <BLOCKQUOTE>
tag causes enclosed text to be indented from both margins, and
is often used as an easy way to get this effect. Unfortunately, software which actually assumes that
such text is going to be a quotation is going to give misleading information about the page as a result.
Similarly, the <CODE>
tag can be used to display text in a monospaced font (such as
Courier), and
such text may be misinterpreted as computer code as a result.
<STRONG>
, <CITE>
,
<BLOCKQUOTE>
, etc. are defined in the HTML standards only in terms
of content. Their visual
appearance is not prescribed. Even though the most popular browsers have converged over the past few
years in their ways of displaying these content-based tags, there's no guarantee that all browsers
will continue to do so. (Remember how the first versions of Internet Explorer
displayed heading tags in different colors rather than different sizes?) Using these tags for
their appearance (based on how one or two currently popular browsers display them) risks eventual
disaster. If you want your pages to display as similarly as possible across different browsers, your choices
are:
Terms to know from this lesson |
<STRONG> and </STRONG> tags: Enclose
text to be strongly emphasized. Browsers may differ on how they do this, though rendering in bold is most
common. |
<CITE> and </CITE> tags: Enclose
a bibliographic citation to another work. |
<BLOCKQUOTE> and </BLOCKQUOTE> tags: Enclose
a quotation from another work. |
<CODE> and </CODE> tags: Enclose
computer code displayed on a page. |
Blog: If you don't know what this means you don't want to. Trust me on this one. |