Lists
HTML <ol> Tag
The <ol> tag defines an ordered list. An ordered list can be numerical or alphabetical.
Definition and Usage
The <ol> tag defines an ordered list. An ordered list can be numerical or alphabetical.
Standard Syntax:
<ol>...</ol>Interactive ExampleRunnable
HTML <ol> Example
htmlLive code demonstration for the <ol> tag. Click "Try it Yourself" to edit and experiment in real time.
<div style="font-family: system-ui, sans-serif; padding: 16px; background: #ffffff; border-radius: 8px; border: 1px solid #e2e8f0; color: #0f172a;">
<ol>
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ol>
<ol start="50">
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ol>
</div>Attributes for <ol>
3 Supported Attributes| Attribute | Values | Default | Description |
|---|---|---|---|
| reversed | reversed | none | Specifies that the list order should be reversed (9,8,7...) |
| start | number | none | Specifies the start value of an ordered list |
| type | 1 A a I i | none | Specifies the kind of marker to use in the list |
Global Attributes
The <ol> tag also supports the standard global attributes in HTML, including class, id, style, title, hidden, and data-*.
Event Attributes
The <ol> tag supports event attributes in HTML, such as onclick, onmouseover, onfocus, and more.
Browser Compatibility
ChromeEdgeFirefoxSafariOpera
More Tags in Lists
View All 123Tags →<dd>The <dd> tag is used to describe a term/name in a description list.<dir>Well organized and easy to understand Web building tutorials with lots of examples of how to use HTML, CSS, JavaScript, SQL, Python, PHP, Bootstrap, Java, XML and more.<dl>The <dl> tag defines a description list.<dt>The <dt> tag defines a term/name in a description list.<li>The <li> tag defines a list item.<menu>The <menu> tag defines an unordered list of content.