HTML <ol> Element
The <ol> tag in HTML is used to create ordered lists on a webpage. Ordered lists are typically used to display a list of items in a specific order, such as a numerical or alphabetical order.
Below is a table that explains the main tag attributes of the <ol> tag:
| Attribute | Description |
|---|---|
| type | Specifies the type of numbering for the list items. Possible values include 1 (numbers), A (uppercase letters), a (lowercase letters), I (uppercase Roman numerals), and i (lowercase Roman numerals). |
| start | Specifies the starting value of the first list item. The default value is 1. |
| reversed | If present, the list items will be numbered in reverse order. |
Below is an example of how to use the <ol> tag with some fictional data:
<ol type="i" start="5">
<li>First item</li>
<li>Second item</li>
<li>Third item</li>
</ol>
This example will produce the following ordered list:
- First item
- Second item
- Third item