2. HTML Specification
HTML supports several types of lists, all of which may be nested.
Level 0
A definition list is a list of terms and corresponding definitions. Definition lists are typically formatted with the term flush-left and the definition, formatted paragraph style, indented after the term.
Example of use:
<DL> <DT>Term<DD>This is the definition of the first term. <DT>Term<DD>This is the definition of the second term. </DL>If the DT term does not fit in the DT column (one third of the display area), it may be extended across the page with the DD section moved to the next line, or it may be wrapped onto successive lines of the left hand column.
Single occurrences of a <DT> tag without a subsequent <DD> tag are allowed, and have the same significance as if the <DD> tag had been present with no text.
The opening list tag must be <DL> and must be immediately followed by the first term (<DT>).
The definition list type can take the COMPACT attribute, which suggests that a compact rendering be used, because the list items are small and/or the entire list is large.
Unless you provide the COMPACT attribute, the HTML user agent may leave white space between successive DT, DD pairs.The COMPACT attribute may also reduce the width of the left-hand (DT) column.
If using the COMPACT attribute, the opening list tag must be <DL COMPACT>, which must be immediately followed by the first <DT> tag:
<DL COMPACT> <DT>Term<DD>This is the first definition in compact format. <DT>Term<DD>This is the second definition in compact format. </DL>
Level 0
A Directory List element is used to present a list of items containing up to 20 characters each. Items in a directory list may be arranged in columns, typically 24 characters wide. If the HTML user agent can optimize the column width as function of the widths of individual elements, so much the better.
A directory list must begin with the <DIR> tag which is immediately followed by a <LI> (list item) tag:
<DIR> <LI>A-H<LI>I-M <LI>M-R<LI>S-Z </DIR>
Level 0
A menu list is a list of items with typically one line per item. The menu list style is more compact than the style of an unordered list.
A menu list must begin with a <MENU> tag which is immediately followed by a <LI> (list item) tag:
<MENU> <LI>First item in the list. <LI>Second item in the list. <LI>Third item in the list. </MENU>
Level 0
The Ordered List element is used to present a numbered list of items, sorted by sequence or order of importance.
An ordered list must begin with the <OL> tag which is immediately followed by a <LI> (list item) tag:
<OL> <LI>Click the Web button to open the Open the URL window. <LI>Enter the URL number in the text field of the Open URL window. The Web document you specified is displayed. <LI>Click highlighted text to move from one link to another. </OL>The Ordered List element can take the COMPACT attribute, which suggests that a compact rendering be used.
Level 0
The Unordered List element is used to present a list of items which is typically separated by white space and/or marked by bullets.
An unordered list must begin with the <UL> tag which is immediately followed by a <LI> (list item) tag:
<UL> <LI>First list item <LI>Second list item <LI>Third list item </UL>
Generated with CERN WebMaker