Description

The <ol> (short for ordered list) tag defines an ordered list of items. Each list item is defined by a <li> tag. Typically, ordered-list items are displayed with a number in front of it, but the numbering style can be controlled with the CSS list-style-type property.

The following table summarizes the usages context and the version history of this tag.

Placement:Block
Content:One or more <li> elements
Start/ End Tag:Start tag: required, End tag: required
Version:HTML 2, 3.2, 4, 4.01, 5

Syntax

The basic syntax of the <ol> tag is given with:

HTML/XHTML: <ol> ... </ol>

The example below shows the <ol> tag in action.

<ol>
    <li>Item 1</li>
    <li>Item 2</li>
    <li>Item 3</li>
</ol>

Tag-Specific Attributes

The following table shows the attributes that are specific to the <ol> tag.

Note: The attributes 'start' and 'type' of the

    element was deprecated in previous version of HTML, but reintroduced in HTML5.

Global Attributes

Like all other HTML tags, the <ol> tag supports the global attributes in HTML5.

Event Attributes

The <ol> tag also supports the event attributes in HTML5.

Browser Compatibility

Element
<ol>YesYesYesYesYes