# `<ol>`

> The `<ol>` HTML element represents an ordered list, which typically renders as a numbered list of items.

## How do I make a numbered list that starts at a custom number in HTML?

The element that creates an ordered list of items, where each item is preceded by a number or letter. It's used when the sequence or ranking of list items is important.

- Topic: Lists
- Type: tag
- Browser support: Chrome 1+, Chrome Android 18+, Edge 12+, Firefox 1+, Firefox Android 4+, Safari 4+, Safari iOS 3.2+

## Example

Wrong:

```html
<p>1. Preheat the oven</p>
<p>2. Mix the dough</p>
<p>3. Bake</p>
```

Right:

```html
<ol>
  <li>Preheat the oven</li>
  <li>Mix the dough</li>
  <li>Bake</li>
</ol>
```

`<ol>` numbers items automatically and tells screen readers how many steps there are.

## Common mistakes

- Typing '1.' and '2.' into paragraphs instead of using `<ol>`.
- Hiding numbers with CSS for a list where order matters to the reader.

## Key points

- Numbers come from `<ol>`, not typed into the item text.
- A list that continues elsewhere uses `start`, not manual numbering.
- Only `<li>` elements are direct children of the `<ol>`.

## Interview questions

### How do I start an ordered list at 5?

Add `start="5"` to the `<ol>`. To change one item's number, set `value` on that `<li>`.

### How do I make a countdown list?

Add the `reversed` attribute to the `<ol>`, and the numbers count down from the item count or from `start`.

### How do I use letters or roman numerals?

Use `type="a"`, `type="A"`, `type="i"` or `type="I"` on the `<ol>`, or set `list-style-type` in CSS.

## Related cards

- [`<ul>`](https://wonderium.dev/html/ul.md)
- [`<li>`](https://wonderium.dev/html/li.md)
- [list-style-type](https://wonderium.dev/css/list-style-type.md)
- [counter()](https://wonderium.dev/css/counter.md)
- [list](https://wonderium.dev/a11y/list.md)

---

- Level: [HTML](https://wonderium.dev/html.md)
- HTML version: https://wonderium.dev/html/ol
- Last updated: 2026-11-25
