The <ol> Element
As defined in the HTML Living Standard, the <ol> (ordered list) element represents an ordered sequence of items, typically rendered with numbers.
Visual Example:
- First step in the process
- Second step in the process
- Third step in the process
<ol>\n <li>Step One</li>\n <li>Step Two</li>\n</ol>
View HTML Living Standard: The ol element
When to Use Ordered Lists
Use an <ol> when the order of the items is meaningful to the user.
- Instructions/Recipes: Steps that must be followed in a specific sequence.
- Rankings: Top 10 lists where the position indicates importance.
- Legal Documents: Numbered clauses or sections.
WCAG Requirement: Info and Relationships
Success Criterion 1.3.1 (Level A): Information, structure, and relationships conveyed through presentation can be programmatically determined.
Using <ol> tells assistive technology that the sequence is important, and it will announce the current item's number (e.g., "Item 1 of 3").