Encodera

Thanks for reading!

Donate to the site — we work hard for you.

HTML & CSS reference

<ol>

A numbered list: items whose order matters.

Syntax

<ol start="1">
  <li>Step</li>
</ol>

Attributes

ParameterTypeDescription
startnumberOptional. The number to start counting from.
reversed—Optional. Count down instead of up.
type1 | a | A | i | IOptional. The numbering style: digits, letters, Roman numerals.

Examples

A step-by-step recipe:

<ol>
  <li>Boil the water</li>
  <li>Grind the beans</li>
  <li>Pour and wait 4 minutes</li>
</ol>

A countdown and letters:

<ol reversed>
  <li>Three</li>
  <li>Two</li>
  <li>One</li>
</ol>
<ol type="a" start="3">
  <li>Item c</li>
  <li>Item d</li>
</ol>

Notes

The browser numbers the items itself: add an item in the middle and the rest are renumbered. A single item can get its own number with the value attribute on <li>.

See also

  • <ul> — A bulleted list: items whose order does not matter.
  • <li> — An item of a `<ul>`, `<ol>` or `<menu>` list.

Related recipes

In the tutorial

  • Lists — Bulleted and numbered lists, numbering options, nested lists and description lists in HTML.

Thanks for reading!

Donate to the site — we work hard for you.