Examples of various list elements in HTML

Lists without the COMPACT attribute

An unnumbered list (UL): A numbered list (OL):
  1. alpha
  2. beta
  3. gamma.
A "directory" (DIR) list:
  • alpha
  • beta
  • gamma.
  • A "menu" list (MENU):
  • alpha
  • beta
  • gamma.
  • A definition list (DL):
    alpha
    the first letter of the Greek alphabet
    beta
    the second letter of the Greek alphabet
    gamma
    the third letter of the Greek alphabet.

    Lists with the COMPACT attribute

    An unnumbered list (UL): A numbered list (OL):
    1. alpha
    2. beta
    3. gamma.
    A "directory" (DIR) list:
  • alpha
  • beta
  • gamma.
  • A "menu" list (MENU):
  • alpha
  • beta
  • gamma.
  • A definition list (DL):
    alpha
    the first letter of the Greek alphabet
    beta
    the second letter of the Greek alphabet
    gamma
    the third letter of the Greek alphabet.

    Using a table to present a definition list

    For comparison, here is the above definition list presented (in one, very simple way) as a table:
    alpha the first letter of the Greek alphabet
    beta the second letter of the Greek alphabet
    gamma the third letter of the Greek alphabet.

    (See also the Using a table to present a definition list section in Learning HTML 3.2 by Examples.)


    Jukka Korpela, jkorpela@malibutelecom.com
    This document belongs to the context of Learning HTML 3.2 by Examples
    The URL for this document is ../HTML3.2/lists.html
    Created: December 11, 1996