[an error occurred while processing this directive]
Lists
This page is part of the WebCom Web Publishing Guide. It explains how to create lists using HTML.
List tags cause standard items (such as bullets or numbers) to be inserted before the listed text. They can be "nested" within one another to create sub-lists (the effect of this on the appearance of a document differs with the browser used). The text of a list entry uses the same style and fonts as normal text.
Using a unordered list tag causes bullets (or the equivalent, if the viewer is using a text mode browser such as Lynx) to be placed before the listed text.
An "unordered list" is opened by <UL> and closed by </UL>. Listed items between them are preceeded by <LI>. Note about using images as bullets.
Tags used to create this list:
<UL>
<LH>This is a list header!
<LI>Any
<LI>Text
<LI>Here
</UL>
Using a numerically ordered list tag causes numbers (starting from one) to be placed before the listed text. An "ordered list" is opened by <OL> and closed by </OL>. Listed items between them are preceeded by <LI>.
Tags used to create this list:
<OL>
<LH>This is a list header!
<LI>One
<LI>Two
<LI>Three
</OL>
Definition lists place nothing before entries preceeded by <DT>, and indent entries following <DD>.
An "definition list" is opened by <DL> and closed by </DL>. Listed items between them are preceeded by <DT> (Definition Term) and then <DD> (Definition Definition). Use of <DT> without <DD> or vice versa is non-standard.
Tags used to create this list:
<DL>
<LH>This is a list header!
<DT>Term
<DD>Definition
<DT>Another Term
<DD>Another Definition
<DT>One More Term
<DD>One More Definition
</DL>
Note on multiple paragraphs following a DD tag.
A definition list can be set to use less space between lines (if the browser viewing the page supports this) to "compact" them, as shown in this example. However, many browsers do not recognize this tag.
Tags used to create this list:
<DL COMPACT>
<DT>Term
<DD>Definition
<DT>Another Term
<DD>Another Definition
<DT>One More Term
<DD>One More Definition
</DL>
This is used for short lists of items, such as file names.
Tags used to create this list:
<DIR>
<LI>alpha.html
<LI>beta.html
<LI>theta.html
<LI>zeta.html
</DIR>
Lists can be "nested" within each other. The effect of this on the appearance of a document varies with the browser used to view it. Different types of lists can be "nested" within each other. For example, a catalog might list various producets with an unordered list, and then list each version of the product numerically, using an ordered list.
This is a nested list using the unordred (or bullet) list tag.
Tags used to create this list:
<UL>
<LI>Top Level List Entry
<UL>
<LI>Second Level Entry
<LI>Second Level Entry
<LI>Second Level Entry
</UL>
<LI>Top Level List Entry
<UL>
<LI>Second Level Entry
<UL>
<LI>Third Level Entry
<LI>Third Level Entry
</UL>
<LI>Second Level Entry
</UL>
<LI>Top Level List Entry
</UL>
This is a nested list using the unordred (or bullet) list tag as the top level list, and the ordered (or numerical) list tag as the nested list tag.
Tags used to create this list:
<UL>
<LI>Top Level List Entry
<OL>
<LI>Nested
<LI>Lists
<LI>Entries
</OL>
<LI>Top Level List Entry
<OL>
<LI>Nested
<LI>Lists
<LI>Entries
</OL>
<LI>Top Level List Entry
</UL>