<ol> HTML Tag

Element of
Lists Bring Order To Web Pages: Here’s The HTML Code To Create Them
What does <ol> HTML Tag do?
The <ol> element is used to create an ordered list. An ordered list is created by nesting one or more <li> elements between the opening and closing <ol> tags.

Code Example

<p><strong>There are 6 species of flamingo:</strong></p>
  <li>American flamingo</li>
  <li>Greater flamingo</li>
  <li>Lesser flamingo</li>
  <li>Andean flamingo</li>
  <li>Chilean flamingo</li>
  <li>James's flamingo</li>

There are 6 species of flamingo:

  1. American flamingo
  2. Greater flamingo
  3. Lesser flamingo
  4. Andean flamingo
  5. Chilean flamingo
  6. James's flamingo


The ol element is used to define an ordered list. This is a list where each list item is preceded by a numerical or alphabetical identifier (as opposed to an unordered list, ul, which has list items preceded by bullet points). It’s good practice to use ol where the steps in the list must be carried out in sequence.

Changing the Identifier

Use the type attribute to customize the identifier before each list item.


Browser Support for ol