<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:
- American flamingo
- Greater flamingo
- Lesser flamingo
- Andean flamingo
- Chilean flamingo
- 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
.