AN INTRODUCTION TO HTML

LISTS

<LI> Line Item

All list structures, except for glossaries, use <LI> to mark the individual items within a list.


<UL>, </UL> Unordered List

Source:

    <UL>
    <LI>No text directly follows a <TT>&lt;UL&gt;</TT>, only
        <TT>&lt;LI&gt;</TT>'s and other lists may appear
    <LI>For unordered lists, bullets are used to denote each line item
    <LI>Sub-lists 
        <UL>
        <LI>can be nested within a list
        <LI>each nesting level causes additional line indentation
        <LI>for unordered lists the bullets change shape at 
            each nesting level
        </UL>
    <LI>An unordered list is terminated by <TT>&lt;/UL&gt;</TT>
    </UL>

<OL>, </OL> Ordered List

  1. No text directly follows a <OL>, only <LI>'s and other lists may appear
  2. For ordered lists, numbers are used to denote each line item
  3. Sub-lists
    1. can be nested within a list
    2. each nesting level causes additional line indentation
    3. for ordered lists the numbers restart at each nesting level
  4. An ordered list is terminated by </OL>

Source:

    <OL>
    <LI>No text directly follows a <TT>&lt;OL&gt;</TT>, only
        <TT>&lt;LI&gt;</TT>'s and other lists may appear
    <LI>For ordered lists, numbers are used to denote each line item
    <LI>Sub-lists 
        <OL>
        <LI>can be nested within a list
        <LI>each nesting level causes additional line indentation
        <LI>for ordered lists the numbers restart at each nesting level
        </OL>
    <LI>An ordered list is terminated by <TT>&lt;/OL&gt;</TT>
    </OL>

<DIR>, </DIR> Directory List

Source:

    <DIR>
    <LI>item1
    <LI>item2
    <LI>item3
    <LI>item4
    </DIR>

Output generated by this browser:

  • item1
  • item2
  • item3
  • item4

  • <MENU>, </MENU> Menu List

    Source:

        <MENU>
        <LI>item1
        <LI>item2
        <LI>item3
        <LI>item4
        </MENU>
    

    Output generated by this browser:

  • item1
  • item2
  • item3
  • item4

  • <DL>, </DL> Glossary List

    Source:

        <DL>
        <DT>Unordered List
        <DD>An outline structure of bullet-ed items. The shape of the bullets 
            at each nesting level may differ.
        <DT>Ordered List
        <DD>An outline structure of numbered items. The numbering sequence 
            restarts at each nesting level.
        <DT>Directory List
        <DD>Display multiple items on a single line (browser permitting).
        <DT>Menu List
        <DD>An unordered list without bullets (browser permitting).
        <DT>Glossary List
        <DD>A glossary of terms with definitions appearing as indented 
            paragraphs.
        </DL>
    

    Output generated by this browser:

    Unordered List
    An outline structure of bullet-ed items. The shape of the bullets at each nesting level may differ.
    Ordered List
    An outline structure of numbered items. The numbering sequence restarts at each nesting level.
    Directory List
    Display multiple items on a single line (browser permitting).
    Menu List
    An unordered list without bullets (browser permitting).
    Glossary List
    A glossary of terms with definitions appearing as indented paragraphs.

    [ TOC | BACK | NEXT ]
    Updated: Nov 25, 1995