OL - Ordered List

Syntax <OL>...</OL>
Attribute Specifications
  • TYPE=[ 1 | a | A | i | I ] (numbering style)
  • START= (starting number)
  • COMPACT (compact display)
Contents One or more elements
Contained in , , , , , , , , , , , , , , , , , ,

The OL element defines an ordered list. The element contains one or more elements that define the actual items of the list.

Unlike with an unordered list (), the items of an ordered list have a definite sequence. Items in an ordered list are numbered by the browser.

The TYPE attribute of OL suggests the numbering style on visual browsers. The case-sensitive values are as follows:

The numbering style on an individual list item can be suggested using the TYPE attribute of . The property of provides greater flexibility in suggesting numbering styles.

The START attribute suggests the starting number for the list and defaults to 1. The value of START must be an integer, but the number may be presented in a different form (for example, as a Roman numeral). While this attribute is deprecated, there is currently no substitute for it in .

The COMPACT attribute suggests that visual browsers render the list compactly, perhaps with reduced spacing between items. This attribute is not well supported among browsers.

More Information