<ol>
HTML <ol> (Ordered List) Tag
Example
<ol>
<li>One</li>
<li>Two</li>
<li>Three</li>
</ol>
Meaning
The <ol> element is used to define an ordered or numbered list of items.
The numbering style comes in many forms, including letters, Roman numerals, and regular numerals.
The individual items within the list are specified by <li> elements included with the ol element.
Note: HTML5 returns the start attribute to ordered lists and adds the reversedattribute
Version: HTML 2, 3.2, 4, 4.01, 5
Standard Syntax
<ol>
<li></li>
</ol>
Attributes
| Attribute | Value | Description |
|---|---|---|
| compact | compact | Deprecated. Specifies that the list should be rendered in a compact style. |
| reversed | reversed | Specifies that the counting of the list should go in reverse order. |
| start | number | Specifies the start value of an ordered list |
| type | 1 A a I i |
Specifies the kind of marker to use in the list |
Global Attributes
The <ol> element also supports the Global Attributes in HTML.
Event Attributes
The <ol> element also supports the Event Attributes in HTML.
Live Demonstration:
- One
- Two
- Three
Choose a list style type:
disc
circle
square
decimal
decimal-leading-zero
lower-roman
upper-roman
lower-greek
lower-alpha
lower-latin
upper-alpha
upper-latin
armenian
georgian
none
inherit
Enter list start:
CSS:
<One>
<Two>
<Three>
<ol>
By Default CSS Value(s)
Most of the browsers will display the <ol> element with the following by default value(s)
ol {
display: block;
list-style-type: decimal;
margin-top: 1em;
margin-bottom: 1em;
margin-left: 0;
margin-right: 0;
padding-left: 40px;
}
Related Tags:
<blockquote>,<dd>,<div>,<dl>,<dt>,<figcaption>,<figure>,<hr>,<li>,<ol>,<p>,<pre> and<ul>