ol – numbered list
<ol><li>…</li></ol>
A numbered list – items whose order matters: the method in a recipe, the steps of a tutorial, a ranking. The browser adds the numbers itself, so nothing has to be renumbered after adding or deleting an item.
- Default display:
display: block - End tag: required
- Content: only
li(andscriptortemplate) - Where it can be used: anywhere flow content is allowed
- DOM interface:
HTMLOListElement
Attributes
- start – the number of the first item (even negative or zero).
- reversed – numbering backwards (a ranking from 10 to 1).
- type – the kind of numbers:
1(default),a,A,i,I(lowercase and uppercase letters, Roman numerals). Unliketypeonul, it is not obsolete – the kind of numbering is part of the meaning (a reference to “point b)”).
Examples
Steps and numbering continued from 3:
<ol> <li>Prepare the starter.</li> <li>Knead the dough.</li> </ol> <p>The next day:</p> <ol start="3"> <li>Shape the dough.</li> <li>Bake for 40 minutes.</li> </ol>
A countdown and points marked with letters:
<ol reversed> <li>Bronze</li> <li>Silver</li> <li>Gold</li> </ol> <ol type="a"> <li>I agree</li> <li>I disagree</li> </ol>
Things to watch out for
- The number of a particular item is changed by
valueonli; the following items then continue from it. - The look of the numbers (color, bold) is changed with
::marker, the kind of numbering withlist-style-type– for examplelower-alphaorupper-roman. startandvalueare numbers even withtype="a"–start="3"starts with the letter c.
Browser support
Baseline – widely available: works in all major browsers and has for a long time (since 2015 at the latest). Since version: Chrome 1, Firefox 1, Safari 4. As of October 2026 (MDN browser-compat-data).
Related:
ul – bulleted list
li – list item
dl – description list
nav – navigation