Ol Tag in HTML5

In this article I am going to describe about the implementation and use of Ol Tag in HTML5.
  • 1700

<ol> Tag

The <ol> tag defines an ordered list. An ordered list can be numerical or alphabetical. In other words, the ordered list is represented as listing by number serially. <ol> tag must have opening and closing tags.

<li> tag is used to define list items.


The syntax for <ol> tag is

<ol>List of ordered items</ol>

This tag have two specific attributes are as:

start="value"    This attribute value specify the list value of the first list item. The number must be a ordinal value.

reversed="value"  This attribute indicates that the list item is in descending if present and in ascending if not present.

Browser Support

It is supported in all major browsers.


  Attribute      Value             Description
   reversed    reversed   specifies that the list order should be descending
     start    number   specifies the start value of an ordered list
     type     1,A,a,I,i     
     Value           Description
       1  Represents decimal numbers (eg. 1. 2. 3. ... etc)
       A  Represents upper case latin alphabet (eg. A. B. C. ... etc)
       a  Represents lower case latin alphabet (eg. a. b. c. ... etc)
       I  Represents upper case roman numerals (eg. I. II. III. ... etc)
       i  Represents lower case roman numerals (eg. i. ii. iii. ... etc)

Start attribute is not supported by HTML4.01 but HTML5 support it.

The reversed attribute is the new introduction in HTML5.

Example of <ol> tag in HTML5

<!DOCTYPE html>

<html lang="en" xmlns="http://www.w3.org/1999/xhtml">


    <meta charset="utf-8" />

    <title>Ol Tag in HTML5</title>











    <ol start="10">











© 2020 DotNetHeaven. All rights reserved.