| ToC ~ Up ~ Prev ~ Next ~ Index |
Introduction to HTML Last Update: 5 January 1998 |
HTML supports several elements for making lists.
They can be divided into two types: glossary lists,
and regular lists. Glossary Lists are denoted by
the element <DL>, while regular lists are denoted
by the elements <UL>, <OL>,
<MENU> and
<DIR>. Lists can be nested. Thus you can have
a regular list within a regular list, a regular list
within a glossary list, and so on. Some examples are
shown below.
This document describes glossary lists. The following document ([Next] from the menu at the top of the page) explains the formatting of regular lists.
This list type, also known as a definition list, is used to present a list of items along with descriptive paragraphs. This can be used for glossaries, but is also useful for presenting a named list of items and their meanings. The items within the list are introduced by the two elements:
<DT> -- The `Term' (a single line)<DD> -- The `Definition' (may be multiple lines)DL can take a single attribute, COMPACT, to signify that the list is small (or large) and should be rendered in a physically compact way. This attribute is ignored by several browsers.
Here is an example from the Paragraphs section of this manual (with a small addition to show a nested regular list:)
<dl>
<dt> Things to Avoid: </dt>
<dd> You should NOT use elements that define paragraph
formatting within the PRE element. This means you should
not use <code> <P>, <ADDRESS>, <Hn>
</code>and so
on. You should avoid the use of tab characters -- use single
blank characters to space text apart. </dd>
<dt> Things That are OK: </dt>
<dd>You <em> can </em> use Anchor. A typed
carriage return will cause a new line in the presented text.
People you should never let format lists include:
<ul>
<li> Bozo the Clown </li>
<li> Uncle Fester </li>
<li> Knights who say nii </li>
</ul>
Which would be downright silly in the first place. </dd>
</dl>
This is rendered as:
<P>, <ADDRESS>, <Hn> and so on. You
should avoid the use of tab characters -- use single blank
characters to space text apart. Look at Section 4.7.2 for information on regular lists.
| ToC ~ Up ~ Prev ~ Next ~ Index |
Introduction to HTML © 1994-1998 by Ian Graham Last Update: 5 January 1998 |