![]() |
![]() |
You can create a variety of lists in your document by using the UL, OL, MENU, and DIR elements in conjunction with the LI element. You can also create definition lists that give you a simple two-column list for terms and their definitions.
For example, you can create a bulleted list, consisting of individual items preceded by a bullet character, by using UL and LI, as in the following example:
<UL> <LI>Bulleted Lists <LI>Ordered Lists <LI>Directory Lists <LI>Itemized Lists <LI>Definition Lists </UL>
This displays as:
You use the OL and LI elements to create an ordered list. The ordered list consists of individual items that are sequentially numbered or lettered. To set the style of numbering or lettering, you use the TYPE= attribute in OL. Similarly, you use the START= attribute to set the initial number or letter. By default, the style is decimal numbers starting at 1.
<OL> <LI>Step One. <LI>Step Two. <LI>Step Three. </OL>
This displays as:
The DIR and LI elements create a directory list, consisting of individual items (none containing more than 20 characters) displayed in columns. The MENU and LI elements create an itemized list consisting of individual items.
A definition list is formatted as a two-column list with terms on the left and their definitions on the right. You use the DL, DT, and DD elements to create definition lists. The following example shows how to use these elements to create a list:
<DL> <DT>Cat <DD>A small domesticated mammal. <DT>Lizard <DD>A member of the reptile family found in dry areas. </DL>
This displays as:
![]() |
![]() |