Skip to content

<ol> - Ordered List

Block-level HTML 2.0

The <ol> element represents an ordered list of items, where the sequence is meaningful. Items are typically numbered automatically, making it perfect for steps, rankings, or any content where order matters.

Result
<ol>
<li>First item</li>
<li>Second item</li>
<li>Third item</li>
</ol>

The <ol> element contains one or more <li> (list item) elements, which are automatically numbered.

Specifies the numbering style:

Result

Specifies the starting number:

Result

Reverses the numbering order:

Result

The <ol> element supports all global attributes like id, class, and style.

Result
Result
Result
Result
Result
Result
Result
Result
Result
Result
Result
Result

Screen readers announce ordered lists with numbers:

<!-- Screen reader: "List, 3 items. 1, First step. 2, Second step. 3, Third step." -->
<ol>
<li>First step</li>
<li>Second step</li>
<li>Third step</li>
</ol>

Make each step clear and actionable:

<ol>
<li>Click the "Download" button in the top right corner</li>
<li>Open the downloaded file from your Downloads folder</li>
<li>Follow the installation wizard prompts</li>
</ol>

Ensure steps follow a logical sequence:

Result
  • Order/sequence matters
  • Steps must be followed in order
  • Rankings or priorities exist
  • Numbering adds meaning
<h3>Recipe Steps</h3>
<ol>
<li>Preheat oven</li>
<li>Mix ingredients</li>
<li>Bake for 30 minutes</li>
</ol>
Result
Result
BrowserVersionNotes
Chrome1+Full support, reversed since v18
Firefox1+Full support, reversed since v18
Safari1+Full support, reversed since v6
Edge12+Full support
IE3+Full support, no reversed

The <ol> element has been supported since early HTML. The reversed attribute is HTML5.