Lists
Lists allow important data/information
to be presented in a clear and easy-to-read manner.
HTML allows three main types.
- Unordered,
also known as a bullet list, uses <UL>
- Ordered,
also known as a numbered list, uses <OL>
- Definition uses <DL>
<UL>, <OL> and <DL>
are the tags that define the type of list. The entries
in bullet and numbered lists use the tag <LI>, while entries in a definition list use the
tag <DT>.
For example,
<UL>
<LI>first list item
<LI>second list item
<LI>third list item
</UL> |
... would be displayed as,
- first list item
- second list item
- third list item
|
<OL>
<LI>first list item
<LI>second list item
<LI>third list item
</OL> |
- first list item
- second list item
- third list item
|
<DL>
<DT>first list item
<DT>second list item
<DT>third list item
</DL> |
- first list item
- second list item
- third list item
|
In the examples below, lists
are nested within lists and different types of lists have been created.
For example,
<OL TYPE=1>
<LI>first list item
<OL TYPE=i>
<LI>first item
<LI>second item
</OL>
<LI>second list item
<OL TYPE=I>
<LI>third item
<LI>forth item
</OL>
<LI>third list item
<OL TYPE=a>
<LI>fifth item
<LI>sixth item
</OL>
</OL>
<LI>forth list item
<OL TYPE=A>
<LI>seventh item
<LI>eight item
</OL>
</OL> |
... would be displayed as,
- first list item
- first item
- second item
- second list item
- third item
- forth item
- third list item
- fifth item
- sixth item
- forth list item
- seventh item
- eigth item
|
|
|
<UL TYPE=DISC>
<LI>first list item
<UL TYPE=CIRCLE>
<LI>first item
<LI>second item
</UL>
<LI>second list item
<UL TYPE=SQUARE>
<LI>third item
<LI>forth item
</UL>
</UL> |
- first list item
- second list item
|
|