HTML defines five kinds of lists:
All list tags have common elements:
Numbered lists are surrounded by the Ordered List tags <OL> and </OL>. Each item within the list begins with the <LI> tag. The <LI> tag is a one sided tag, it doesn't need to be followed by a </LI>. Here is an example of a numbered list:
How to start a car:
And here is the code:
<P>How to start a car:</P>An unordered list is simular to a Numbered list except that the numbers are replaced by a "bullet" or marker. Unordered lists are surrounded by <UL> at the beginning and followed by </UL>. As in a numbered list each item is preceded by a </LI>. Here is an example of an unordered list:
Rooms in a house:
Here is the code:
<P>Rooms in a house:</P>Glossary lists, or definition lists, are slightly different from other lists. Each list item in a glossary list has two parts:
Here is an example of a glossary list:
Some HTML tags and there meanings:
And here is the code:
<P>Some HTML tags and there meanings:</P>There is also a "COMPACT" version for the glossary tag. You mearly write COMPACT after the DL like this <DL COMPACT>. The tailing </DL> does not change. Here is the same example as above with the COMPACT attribute:
Some HTML tags and there meanings:
And here is the code:
<P>Some HTML tags and there meanings:</P>
<DL COMPACT>
<DT>H1<DD>The largest of the Heading fonts.
<DT>H2<DD>The next largest Heading font.
<DT>H3 thru H6<DD>As the number gets larger, the font gets smaller.
</DL>
Since I believe that Menu and Directory list are no longer supported by the HTML specification. I will not go into them. Most browsers treat them as unordered lists.
Menu List
Directory List
Lists may also be nested inside of each other. Here is an example of a nested list:
Departments on my seismic vessel
Here is the code:
<P>Departments on my seismic vessel</P>
<OL>
<LI>The Marine crew
<LI>The Instrument Department
<UL>
<LI>Don
<LI>Jim
<LI>Lief
<LI>Eric
</UL>
<LI>Machanics
<LI>Navigators
</OL>