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.
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>
This is the way it will look.
Computers
<LI>Amiga
<LI>Commodore 64
<LI>VIC 20
<LI>PC
</UL>
Computers
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.- Amiga
- Commodore 64
- VIC 20
- PC
<UL TYPE=DISC>
or
<UL TYPE=SQUARE>
Works the same way as unordered lists but instead of <UL> you start your list with <OL>.
<OL>
This is the way it will look.
Computers
<LI>Amiga
<LI>Commodore 64
<LI>VIC 20
<LI>PC
</OL>
Computers
You may change the way the list is counting, there are some alternatives to standard numbers.- Amiga
- Commodore 64
- VIC 20
- PC
<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>
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>
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.
<DT>Amiga
<DD>Nice computer.
<DT>Commodore 64
<DD>Fun computer.
<DT>VIC 20
<DD>Old computer.
<DT>PC
<DD>Usual computer.
</DL>
If you want the term and your definition on the same row you change the <DL> tag to:
- Amiga
- Nice computer.
- Commodore 64
- Fun computer.
- VIC 20
- Old computer.
- PC
- Usual computer.
<DL COMPACT>
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>
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.
<LI>First<LI>Second
<LI>Third<LI>Fourth
</DIR>
<MENU>
<LI>First
<LI>Second
<LI>Third
<LI>Fourth
</MENU>