Please visit our sponsors.

Lists

There is a special tag in HTML for lists. A list consists of a heading and then the actual content of the list. There are three different kinds of lists, they are:
Unordered list
Simple lists.
Ordered list
Every entry in the list has a value, like TopTen lists.
Definition list
You may have definitions in your list, like this list over list types.

Unordered List

The list starts with the <UL> tag. After that you may write the lists heading, if you don't want any heading you simply skip it. Then you should enter the actual list, this is done with the <LI> tag (no end tag), like this:

<UL>
Computers
<LI>Amiga
<LI>Commodore 64
<LI>VIC 20
<LI>PC
</UL>

This is the way it will look.
As you see there is a bullet in front of every list entry. There are three different bullets you may use; circle (default), square and disc. To use another bullet than circle you change the <UL> tag in the beginning of the list.

<UL TYPE=DISC> or
<UL TYPE=SQUARE>

Ordered List

Works the same way as unordered lists but instead of <UL> you start your list with <OL>.

<OL>
Computers
<LI>Amiga
<LI>Commodore 64
<LI>VIC 20
<LI>PC
</OL>

This is the way it will look.
    Computers
  1. Amiga
  2. Commodore 64
  3. VIC 20
  4. PC
You may change the way the list is counting, there are some alternatives to standard numbers.

<OL TYPE=A> or
<OL TYPE=a> or
<OL TYPE=I> or
<OL TYPE=i> or
<OL TYPE=1>

If you want to change the value the list starts with you use:

<OL VALUE=10>

You can also change the value in the middle of the list by altering the appropriate <LI> tag.

<LI VALUE=10>

Definition List

The definition list differs a little bit from the other list types. It's a list of terms and corresponding definitions. Take a look at this HTML code and you'll figure out how it works.

<DL>
<DT>Amiga
<DD>Nice computer.
<DT>Commodore 64
<DD>Fun computer.
<DT>VIC 20
<DD>Old computer.
<DT>PC
<DD>Usual computer.
</DL>

The <DT> tag is the term, and the <DD> tag is the definition of the term. The list is started with the <DL> tag, otherwise it works the same way as (un)ordered lists.
Amiga
Nice computer.
Commodore 64
Fun computer.
VIC 20
Old computer.
PC
Usual computer.
If you want the term and your definition on the same row you change the <DL> tag to:

<DL COMPACT>

Special Lists

There are two other special lists which look like the others.

The <DIR> list is used to present a list of items containing up to 20 characters each. It may also be arranged in columns.

<DIR>
<LI>First<LI>Second
<LI>Third<LI>Fourth
</DIR>

The other list is the <MENU> list which is used for items which are on only one line. It will display a list which is more compact than an unordered list.

<MENU>
<LI>First
<LI>Second
<LI>Third
<LI>Fourth
</MENU>
Previous Home Previous

Last updated 970622