<ol> HTML Tag
Disclosure: Your support helps keep the site running! We earn a referral fee for some of the services we recommend on this page. Learn more
- 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.
- 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:
- American flamingo
- Greater flamingo
- Lesser flamingo
- Andean flamingo
- Chilean flamingo
- 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
![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
All | All | All | All | All | All |