Ordered Lists (ol element)

info Definition & Purpose

  • Used for items where order matters
  • Displays items with sequential numbering
  • Perfect for steps, directions, and rankings

code HTML Syntax

HTML
<ol>
  <li>Drive to the end of the road</li>
  <li>Turn right</li>
  <li>Go straight across the roundabouts</li>
  <li>Turn left at the third roundabout</li>
</ol>
Key Points
  • Each list item wrapped in <li> tags
  • Entire list wrapped in <ol> tags
  • Numbering style can be customized with CSS

visibility Visual Representation

desktop_windows Browser Preview
  1. Drive to the end of the road
  2. Turn right
  3. Go straight across the roundabouts
  4. Turn left at the third roundabout

check_circle Common Use Cases

  • Step-by-step instructions
  • Directions
  • Recipe steps
  • Rankings and ratings
  • Ordered content sequences