Learning HTML 3.2 by Examples, section 5 Descriptions of HTML 3.2 tags:

LI - list item


To present an item in a list.

Typical rendering

The rendering depends on the nature of the enclosing list.

Basic syntax

<LI>contents of the list item</LI>

The end tag </LI> can always be omitted, and it usually is omitted.

Possible attributes (Not in HTML 2.0!)

The attributes depend on the context as follows.

When the (innermost) enclosing list element is UL or DIR or MENU:

attribute name possible values meaning

When the (innermost) enclosing list element is OL:

attribute name possible values meaning
TYPE 1, a, A, i, I numbering style (as in OL)
VALUE integer sequence number (see OL)

In both cases, the attributes are deprecated in HTML 4.0. For VALUE, especially non-positive values are inconsistently supported in browsers.

Allowed context

UL, DIR, MENU, or OL element.


Block elements and text elements. Notice that heading and ADDRESS elements are not allowed.


An example which does not say very much:
<LI>A list item.</LI>

For more realistic examples, see Examples of various list elements in HTML and examples given in the descriptions of UL, DIR, MENU,and OL element.


LI elements may contain lists, producing nested lists.

The list of bullet types was chosen to cater for the original bullet shapes used by Mosaic in 1993. The list is not very logical. Usually the default bullet type in UL lists is DISC, if the list is not within a UL list, and SQUARE and CIRCLE in the next levels of nesting. In Lynx, the situation is similar with the shapes DISC, SQUARE, and CIRCLE presented as star (*), plus (+) and letter o.

It is hard to imagine any good use for the TYPE attribute in a LI element, as opposite to defining the bullet type for all items of a list in a UL element or other list element.

Date of last update: 2010-12-16.
This page belongs to the free information site IT and communication, section Web authoring and surfing, by Jukka "Yucca" Korpela.