Lists
There are three kinds of lists in HTML.
- ordered lists <OL></OL>
- unordered lists <UL></UL>
- definition lists <DL></DL>
All of the lists have list items. In ordered and unordered lists, lists items are preceded by
an <LI> tag. In a definition list, each list item has two parts: a <DT>
element and a <DD> element. A definition list is similar to a definition in a
dictionary. The <DT> is like the word and the <DD> is like the definition.
Examples of all three types of lists are below:
- <OL>
<LI>one element
<LI>two elements
<LI>three elements
</OL>
In your web browser the above HTML would appear as:
- one element
- two elements
- three elements
- <UL>
<LI>one element
<LI>two elements
<LI>three elements
</UL>
In your web browser the above HTML would appear as:
- one element
- two elements
- three elements
- <DL>
<DT>word
<DD>definition
<DT>word
<DD>definition
<DT>word
<DT>word
</DL>
In your web browser the above HTML would appear as:
- word
- definition
- word
- definition
- word
- word
You can have more than one <DT> tag in a row but you cannot have a
<DD> tag unless it is preceded by a <DT> tag.
Go Back to Main Page.....