Link to USGS home page
Internal USGS Access Only

Learning HTML - Lists

Unordered Lists
The UL element, along with LI (List Item) defines a bulleted list.
<ul>
  <li>One Fish</li>
  <li>Two Fish</li>
  <li>Red Fish</li>
  <li>Blue Fish</li>
</ul>
  • One Fish
  • Two Fish
  • Red Fish
  • Blue Fish

The closing member for LI is optional, but HIGHLY recommended.

Ordered Lists
The OL element, along with LI defines a numbered list.
<ol>
  <li>One Fish</li>
  <li>Two Fish</li>
  <li>Red Fish</li>
  <li>Blue Fish</li>
</ol>
  1. One Fish
  2. Two Fish
  3. Red Fish
  4. Blue Fish

Cascading style sheets can be used to change the starting number, or to increment by letter.

Definition Lists
The DL element, along with DT and DD (Term and Definition) defines a glossary-style listing.
<dl>
  <dt>One Fish</dt>
  <dd>The single fish</dd>

  <dt>Two Fish</dt>
  <dd>A couple, off to spawn perhaps</dd>

  <dt>Red Fish</dt>
  <dd>Probably blushing</dd>

  <dt>Blue Fish</dt>
  <dd>Bad water quality</dd>
</dl>
One Fish
The single fish
Two Fish
A couple, off to spawn perhaps
Red Fish
Probably blushing
Blue Fish
Bad water quality

slide 9


[up]
"Mastering a Web Site" online course
Created and maintained by Lorna Schmid and David Boldt.
http://water.usgs.gov/usgs/training/webmaster/html_lists.html    
Last modified: Tue Oct 14 17:08:58 EDT 2003