Lists

There are three kinds of lists in HTML.

  1. ordered lists <OL></OL>
  2. unordered lists <UL></UL>
  3. 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:

  1. <OL>
    <LI>one element
    <LI>two elements
    <LI>three elements
    </OL>

    In your web browser the above HTML would appear as:
    1. one element
    2. two elements
    3. three elements


  2. <UL>
    <LI>one element
    <LI>two elements
    <LI>three elements
    </UL>

    In your web browser the above HTML would appear as:

  3. <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.....