<ol type="">

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
Attribute of
<ol> HTML Tag
What does <ol type=""> do?
Specifies the type of list marker that should be used on each item of an unordered list.

Code Example

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

Customizing List Identifiers

Use the type attribute to change the identifier before each list item. Specifying the lowercase a type renders the list with smallcase alphabetical identifiers.

For example:

<p><strong>One flamingo in Australia lived to the age of 83, and was thought to be the oldest in the world when it died. Which species was it?</strong></p>
<ol type="a">
  <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>

Results in the following:

Defaults

If the type is not specified, a numbered list will default to a type of decimal, and an unordered list will default to a type of bullet.

Claire is seasoned technical writer, editor, and HTML enthusiast. She writes for HTML.com and runs a content agency, Red Robot Media.