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 (and script or template)
  • 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). Unlike type on ul, 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>
result
  1. Prepare the starter.
  2. Knead the dough.

The next day:

  1. Shape the dough.
  2. Bake for 40 minutes.

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>
result
  1. Bronze
  2. Silver
  3. Gold
  1. I agree
  2. I disagree

Things to watch out for

  • The number of a particular item is changed by value on li; the following items then continue from it.
  • The look of the numbers (color, bold) is changed with ::marker, the kind of numbering with list-style-type – for example lower-alpha or upper-roman.
  • start and value are numbers even with type="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