HTML Lists

HTML Lists

The HTML document also supports some lists. There are two types of lists in HTML document that are; unordered list, and ordered list. Every list must be ended with an end tag, for unordered list, we use <UL> tag and the ending tag is </UL>, for ordered list, we use <OL> tag and the ending tag is </OL>.

A list can never be empty. The UL and OL contain list item elements. A list item element starts with a tag <L1> and the ending tag is </L1> but the ending tag is not necessary.

We can define an unordered list of elements as the lists that does not numbers or letters. A list <L1> element can have text, images, other lists, and paragraphs.


<L1> ordered list items



After saving this document with the html extension and encoding as Unicode, the following will appear on the browser.

List Elements

There are some attributes that are supported by list elements that allow a control of list numbering, and bulleting, etc. It also adds list header LH element. This element is used to add a short heading in the document. The LH must be the first element inside a list.

The LH Element

The LH element is used as follows:


This element contains the character, character highlighting, A, BR, IMG, MATH, TAB elements.

The LH element contains the heading of the list. It can be inside any of the elements defined in HTML document. LH can also have the standard markup, images, line breaks and hypertext anchors.


Resulting in:


The LI element

The LI element can be used as follows:

<LI>…….…. </LI>

The LI element is used to mark an element of the list. The LI element can only contain the block element; this allows the list items to contain the text and character highlighting elements.


<L1> ordered list items



Resulting in;