HTML - OL element (ordered list)
Table of Contents
1 - About
The ol element represents an ordered list.
Ordered and unordered lists are rendered in an identical manner except that visual user agents number ordered list items.
In ordered lists, it is not possible to continue list numbering automatically from a previous list or to hide numbering of some list items.
2 - Articles Related
3 - Example
3.1 - Simple
<ol> <!-- ol = ordered list -->
<li>First Element</li> <!-- li = list item -->
<li>Second Element</li>
<li>Third Element</li>
</ol>
In ordered lists, it is not possible to continue list numbering automatically from a previous list or to hide numbering of some list items. However,
3.2 - Setting the number of a list item
Authors can reset the number of a list item by setting its value attribute. Numbering continues from the new value for subsequent list items.
<ol>
<li value="30"> makes this list item number 30.</li>
<li value="40"> makes this list item number 40.</li>
<li> makes this list item number 41.</li>
</ol>