Back to course

Lesson 17: Ordered Lists (`<ol>`)

The HTML Masterclass: From Zero to Web Developer

17. Ordered Lists (<ol>)

Ordered lists are used when the sequence or ranking of items is important (e.g., instructions, rankings, or steps in a process).

17.1 Structure

The structure requires a parent <ol> (Ordered List) tag, which contains one or more child <li> (List Item) tags.

html

Instructions for Baking

  1. Preheat oven to 350 degrees.
  2. Mix all dry ingredients in a large bowl.
  3. Fold in wet ingredients gently.
  4. Bake for 30 minutes.

17.2 List Control Attributes

Ordered lists can be controlled using attributes:

  • start: Specifies where the numbering should begin.
  • type: Specifies the type of marker (e.g., 1 for numbers, a for lowercase letters, I for uppercase Roman numerals).

html

  1. Step 4
  2. Step 5