HTML List Tags

Lists: Unordered, Ordered, and Definition Lists

An Unordered List is a bullet list: use <UL>...</UL>, with <LI> for each List Item (the <LI> will use a symbol for the list element, in this case the default is a bullet):

An example:

Here are the days of the workweek:

would be coded as:

Here are the days of the workweek:
<UL>  
  <LI>Monday
  <LI>Tuesday
  <LI>Wednesday
  <LI>Thursday
  <LI>Friday
</UL>

An example without the berger dots:

Here are the days of the workweek:

would be coded as :

Here are the days of the workweek:
<UL>  
   Monday<BR>  
   Tuesday<BR>  
   Wednesday<BR>  
   Thursday<BR>  
   Friday<BR>
</UL>


Note that without the <LI> there is no use of a symbol bullet. Also, a <BR> is needed in this case to cause each element to be on a different line.

An Ordered List is a numbered list: use <OL>...</OL>, with <LI> for each List Item:

An example:

Here are the days of the workweek:

  1. Monday
  2. Tuesday
  3. Wednesday
  4. Thursday
  5. Friday

would be coded as:

Here are the days of the workweek:
<OL>  
  <LI><I>Monday
  <LI>Tuesday</I>  
  <LI>Wednesday
  <LI><B>Thursday</B>  
  <LI>Friday
</OL>


Note the use of bold and italic tags to add some variety to this example.

A Definition List is not based on list items. They are instead based on term-definition pairs. Use <DL>...</DL>, with <DT> as Definition-list Term, and <DD> as Definition-list Definition:

An example:

Doe
a deer, a female deer
Ray
a drop of golden sun

would be coded as:

<DL>  
  <DT>Doe
   <DD>a deer, a female deer
  <DT>Ray
   <DD>a drop of golden sun
</DL>

By using the attribute "COMPACT" via: <DL COMPACT>, the definition is placed on the same line as the term:

Doe
a deer, a female deer
Ray
a drop of golden sun

Lists can be "nested"

An example:

Here are special days and hours:

would be coded as:

Here are special days and hours:
<UL>  
<LI>Monday
     <UL>       
        <LI>8am - 11am
        <LI>12n - 5pm
     </UL>  
<LI>Tuesday
<LI>Wednesday
     <UL>       
        <LI>9am - 12n
        <LI>1pm - 6pm
     </UL>  
<LI>Thursday
<LI>Friday
</UL>