The Web Design Group

ol - Ordered List

Syntax <ol>...</ol>
Attribute Specifications
  • type=[ "1" | "a" | "A" | "i" | "I" ] (numbering style)
  • start=Number (starting number)
  • compact="compact" (compact display)
  • common attributes
Contents One or more li elements
Contained in applet, blockquote, body, button, center, dd, del, div, fieldset, form, iframe, ins, li, map, noframes, noscript, object, td, th

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

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

The deprecated 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 li. The list-style-type property of CSS provides greater flexibility in suggesting numbering styles.

The deprecated 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 Cascading Style Sheets.

The deprecated 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