HTML <ol> Tag
Description
The <ol>
HTML tag, short for "ordered list," is a fundamental element used to create numbered lists in a web page. It is typically used to present information in a structured and sequential manner, such as step-by-step instructions or itemized lists. Within the <ol>
tag, <li>
(list item) elements are used to define individual list items, and the browser automatically generates sequential numbers or other types of markers (e.g., letters or Roman numerals) to label each item. This tag is essential for organizing content hierarchically and providing a clear, numbered sequence to assist readers in understanding and navigating through the information presented on a web page.
Properties
- Permitted Parents
- Any element that accepts flow content
- Content
- One or more <li> elements
- Start/End Tags
- Start tag: required, End tag: required
Example
<ol>
<li>Mouse</li>
<li>Cat</li>
<li>Dog</li>
</ol>
Attributes
Attribute | Definition |
---|---|
reversed | Specifies that the list order should be descending (9,8,7...) |
start | Specifies what number to start numbering from. |
type | Specifies the type of bullet. Possible values:
|
Global Attributes
The <ol>
tag also supports the Global Attributes in HTML5
Event Attributes
The <ol>
tag also supports the Event Attributes in HTML5
Browser Support
The following table will show you the current browser support for the HTML <ol>
tag.
Desktop | |||||
![]() |
![]() |
![]() |
![]() |
![]() |
|
12 | 1 | 1 | 15 | 4 |
Tablets / Mobile | |||||
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
18 | 4 | 14 | 3.2 | 1 | 4.4 |
Last updated by CSSPortal on: 30th March 2024