HTML - Creating Lists

A list is a set of items or phrases written one below the other and related to each other in some way. We make shopping lists, to-do lists, check lists etc. We may humber them from 1 onwards or we may put a symbol such as a star or circle at the beginning of each item.

The most commonly used lists in HTML are unordered and ordered lists. Unordered lists have a bullet before them. Ordered lists are numbered using integers or alphabets or roman numerals.

Unordered Lists

To create an un-ordered list we must first specify the list tag, which in this case is UL.

<UL>

This indicates the beginning of the unordered list tag. Once we do that, we must then specify the individual items. To do that, we must use the LI tag followed by the item. LI stands for List Item. The tag must then be closed. The LI tad is repeates for each item of the list. The following is a list of the features of a computer.

<UL>

<LI> Automatic </LI><BR>

<LI> Fast </LI><BR>

<LI> Versatile </LI><BR>

<LI> Tireless </LI><BR>

</UL>

In the above example, we have created an unordered list.

Ordered List

As already mentioned, the ordered list is used to give numbers to the individual items. The tags are very similar to the unordered list tags. The same example is given below with the new ordered list tags:

<OL>

<LI> Automatic </LI><BR>

<LI> Fast </LI><BR>

<LI> Versatile </LI><BR>

<LI> Tireless </LI><BR>

</OL>

Notice that the only difference is that we use the OL tag instead of the UL tag. By default the items are numbered from 1 onwards. The numbering can be changed as shown below:

<OL TYPE="number format">

The number format could be one of the below:

HOME INDEX

PREVIOUS NEXT