Element of
Lists
What does <ol> 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.
Display
inline
Usage
textual

Code Example

<p><strong>There are 6 species of flamingo:</strong></p>
<ol>
  <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>
</ol>

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

Usage

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

AllAllAllAllAllAll