×

html · level 1 · unit 4 · lesson 2

  1. meet it
  2. guess first
  3. your turn
  4. fix it
  5. nailed it

Tap a green word if you get lost.

meet it

<ol> numbers the items for you.

Some lists need an order, like the steps in a recipe. Use <ol>, short for . The items are still <li>, but they get numbers instead of bullets.

The browser does the counting. Add, remove or swap an item and the numbers update themselves, so never type them in.

Ask yourself: would swapping two items change the meaning? If yes, use <ol>. If not, use <ul>.

<h2>Omelette</h2>
<ol>
  <li>Crack the eggs</li>
  <li>Whisk them</li>
  <li>Pour into the pan</li>
</ol>

Press show my page to see it here.

A shopping list can go in any order, so it stays a <ul>.