The HTML <ol> tag defines an ordered list. An ordered list can be numerical or alphabetical. An ordered list starts with the <ol> tag. Each list item starts with the <li> tag. The list items will be marked with numbers by default.

An ordered HTML list

  1. Coffee
  2. Tea
  3. Milk

Ordered List with Numbers

The <type> attribute of the <ol> tag, defines the type of the list item marker: Type Description

  • type="1"

    The list items will be numbered with numbers (default)

  • type="A"

    The list items will be numbered with uppercase letters

  • type="a"

    The list items will be numbered with lowercase letters

  • type="I"

    The list items will be numbered with uppercase roman numbers

  • type="i"

    The list items will be numbered with lowercase roman numbers

    1. Coffee
    2. Tea
    3. Milk

    Ordered List with Letters

    1. Coffee
    2. Tea
    3. Milk

    Ordered List with Lowercase Letters

    1. Coffee
    2. Tea
    3. Milk

    Ordered List with Roman Numbers

    1. Coffee
    2. Tea
    3. Milk

    The start attribute

    By default, an ordered list will start counting from 1. Use the start attribute to start counting from a specified number:

    1. Coffee
    2. Tea
    3. Milk
    1. Coffee
    2. Tea
    3. Milk

    A Nested List

    Lists can be nested (list inside list):

    1. Coffee
    2. Tea
      1. Black tea
      2. Green tea
    3. Milk