The HTML5 ol Tag
The formal definition of the HTML5 <ol> tag is that it specifies an ordered list. This works with <li> tag because it identifies the list items.
The use of HTML <ol> tag has minimal difference in HTML5 and HTML4.01. There are just some minimal aspects that have been altered. That includes the use of start and type attributes. These are considered obsolete in HTML4.01 but are reused in HTML5. An additional attribute is also added the HTML5 which is the reversed attribute.
Compatibility is not an issue with HTML5 <ol> tag. It is applicable for both the Global Attributes and Events Attributes in HTML5. The HTML5 <ol> tag is also accepted in all common browsers like Firefox, Safari, Opera, Internet Explorer and Google Chrome.
The following attributes are used for HTML5 <ol> tag:
Attribute |
Value |
Description |
reversed |
reversed |
This is used when the numbering for the list is descending (For example: 6,5,4…) |
start |
number |
This is used for indicating the first value for the items in the ordered list |
type |
1 |
It is important when indicating what type of marker will be utilized in the list |