WebCom Home Page
WebCom
WEBCOM HTML GUIDE

WEBCOM'S OWN GUIDE TO HTML
WebCom
Resources


HTML Guide
   · Overview
   · Tags
   · Images
   · Forms

Resources
   · Web Primers
   · HTML Guides
   · HTML Validators
   · Publishing Guide
   · Publicize Your Site
   · Mac Web Tools
   · Windows Web Tools
   · Icons and Graphics
   · Other Resources

Control Panel Login
Customer Support

Contact Us

About WebCom

 
Lists

This page is part of the WebCom Web Publishing Guide. It explains how to create lists using HTML.

List tags cause standard items (such as bullets or numbers) to be inserted before the listed text. They can be "nested" within one another to create sub-lists (the effect of this on the appearance of a document differs with the browser used). The text of a list entry uses the same style and fonts as normal text.


Unordered List

Using a unordered list tag causes bullets (or the equivalent, if the viewer is using a text mode browser such as Lynx) to be placed before the listed text.

An "unordered list" is opened by <UL> and closed by </UL>. Listed items between them are preceeded by <LI>. Note about using images as bullets.

    This is a list header!
  • Any
  • Text
  • Here

Tags used to create this list:
<UL>
<LH>This is a list header!
<LI>Any
<LI>Text
<LI>Here
</UL>


A Numerically Ordered List

Using a numerically ordered list tag causes numbers (starting from one) to be placed before the listed text. An "ordered list" is opened by <OL> and closed by </OL>. Listed items between them are preceeded by <LI>.

    This is a list header!
  1. One
  2. Two
  3. Three

Tags used to create this list:
<OL>
<LH>This is a list header!
<LI>One
<LI>Two
<LI>Three
</OL>


Definition List

Definition lists place nothing before entries preceeded by <DT>, and indent entries following <DD>.

An "definition list" is opened by <DL> and closed by </DL>. Listed items between them are preceeded by <DT> (Definition Term) and then <DD> (Definition Definition). Use of <DT> without <DD> or vice versa is non-standard.

This is a list header!
Term
Definition
Another Term
Another Definition
One More Term
One More Definition

Tags used to create this list:
<DL>
<LH>This is a list header!
<DT>Term
<DD>Definition
<DT>Another Term
<DD>Another Definition
<DT>One More Term
<DD>One More Definition
</DL>

Note on multiple paragraphs following a DD tag.


Compact Definition List

A definition list can be set to use less space between lines (if the browser viewing the page supports this) to "compact" them, as shown in this example. However, many browsers do not recognize this tag.

Term
Definition
Another Term
Another Definition
One More Term
One More Definition

Tags used to create this list:
<DL COMPACT>
<DT>Term
<DD>Definition
<DT>Another Term
<DD>Another Definition
<DT>One More Term
<DD>One More Definition
</DL>


Directory Lists

This is used for short lists of items, such as file names.

  • alpha.html
  • beta.html
  • theta.html
  • zeta.html
  • Tags used to create this list:
    <DIR>
    <LI>alpha.html
    <LI>beta.html
    <LI>theta.html
    <LI>zeta.html
    </DIR>


    Nested Lists

    Lists can be "nested" within each other. The effect of this on the appearance of a document varies with the browser used to view it. Different types of lists can be "nested" within each other. For example, a catalog might list various producets with an unordered list, and then list each version of the product numerically, using an ordered list.


    List Using Identical Types of List Tags

    This is a nested list using the unordred (or bullet) list tag.

    • Top Level List Entry
      • Second Level Entry
      • Second Level Entry
      • Second Level Entry
    • Top Level List Entry
      • Second Level Entry
        • Third Level Entry
        • Third Level Entry
      • Second Level Entry
    • Top Level List Entry

    Tags used to create this list:
    <UL>
    <LI>Top Level List Entry
    <UL>
    <LI>Second Level Entry
    <LI>Second Level Entry
    <LI>Second Level Entry
    </UL>
    <LI>Top Level List Entry
    <UL>
    <LI>Second Level Entry
    <UL>
    <LI>Third Level Entry
    <LI>Third Level Entry
    </UL>
    <LI>Second Level Entry
    </UL>
    <LI>Top Level List Entry
    </UL>


    Lists Using Different Types of List Tags

    This is a nested list using the unordred (or bullet) list tag as the top level list, and the ordered (or numerical) list tag as the nested list tag.

    • Top Level List Entry
      1. Nested
      2. Lists
      3. Entries
    • Top Level List Entry
      1. Nested
      2. Lists
      3. Entries
    • Top Level List Entry

    Tags used to create this list:
    <UL>
    <LI>Top Level List Entry
    <OL>
    <LI>Nested
    <LI>Lists
    <LI>Entries
    </OL>
    <LI>Top Level List Entry
    <OL>
    <LI>Nested
    <LI>Lists
    <LI>Entries
    </OL>
    <LI>Top Level List Entry
    </UL>



    WebCom Home
    Contact us by email:info@webcom.com
    phone: 1-888-8WEBCOM (1-888-893-2266)
    Copyright © 1994 - 2001 Web Communications.   A Member of the Verio Group.