Lists

There are three types of lists which you may designate through HTML:

  1. ordered lists
  2. unordered lists
  3. definition lists

See how handy lists are? The above is an example of an ordered list. That just means that it is numbered. Here's the HTML code for the above list:

<OL>

<LI>
ordered lists
</LI>

<LI>
unordered lists
</LI>

<LI>
definition lists
</LI>

</OL>

As you can see, the entire list is marked off with the <OL> and </OL> tags. OL stand for Ordered List, which is pretty easy to remember.

The individual list items are marked off with the <LI> and </LI> tags.

Because the list is ordered, the numbers for each item are inserted automatically.

An unordered list is very similar to an ordered list, except that each list item is marked with a bullet instead of a number. Here's the same list presented in an unordered format:

And here is the HTML code for the unordered list:

<UL>

<LI>
ordered lists
</LI>

<LI>
unordered lists
</LI>

<LI>
definition lists
</LI>

</UL>

The only difference is at the beginnng and the end. The list is marked off with the <UL> and </UL> tags (for Unordered List).

The third type of list -- the definition list -- is a bit more complex and is outside the scope of this tutorial.

Lists are block-level elements.


| Introduction to HTML | Tutorials |