Home / code / html

Lists in HTML.

With these tag's you can add list to your pages.
You have 3 sorts of lists :

  1. Unordered lists
  2. Ordered lists
  3. Definition lists

Unordered lists

This just sums up all the list items up.
In HTML it looks like this.

<ul>
   <li></li>
</ul>
You don't need to add </li>, but it's best you do it.
Some programs have it difficult without it, and it also helps to overview your html code.
LI stands for list item and UL stands unordered list, just for the record.
You can add 3 different types of things in front of each list item.
It looks like this:
<Ul TYPE="DISK|CIRCLE|SQUARE">

  • DISC
  • CIRCLE
  • SQUARE
This doesn't work with all browsers, actual very little. Standard is circle.

Ordered list

This ordered the list in numeric or alphabetic.
<li> is replaced with <lo>.
There are 5 ways the sort the list.

  1. Type A
  2. looks like
  3. <ol type="A">
  1. Type a
  2. looks like
  3. <ol type="a">
  1. Type I
  2. looks like
  3. <ol type="I">
  1. Type i
  2. looks like
  3. <ol type="i">
  1. Type 1
  2. looks like
  3. <ol type="1">

Now what do you want you don't want the list to start at 1 ?
<OL START="?">

If you want to stop at a number and you want to continue use :
<li value="?">
Even when you use letters you need to add the number where you want to restart.

Definition list

This is used if you want to add the definition of words.
Looks like this:

<DL>
   <DT> The word </DT>
         <DD> The Definition </DD>
</DL>

The result:
The word
The definition

 

TOP

Latest script:

 

Books: