ol element

<OL> (Ordered List Element)

Explanation

OL element is used to create ordered list in a HTML document.
<ol> <li>Text</li> <li>Text</li> </ol>
Element Specific attributes supported by this tag are:
AttributeValueDescription
reversed reversed Signifies that the list order must be in descending order.
start number Mentions start value of an ordered list.
type 1, A, a, I, i Indicates the type of marker to be used in list.

"Reversed" attribute has been newly introduced in HTML5.

Example:

Result :

  1. Indigo
  2. Jet Airways
  3. Air India

Example For Start Attribute:

Result :

  1. Indigo
  2. Jet Airways
  3. Air India

Example For Type Attribute:

Result :

  1. Indigo
  2. Jet Airways
  3. Air India

Example For Reversed Attribute:

Result :

  1. Indigo
  2. Jet Airways
  3. Air India
  • Make use of the element specific attributes to create variety of list items.
  • It is necessary to use <li> with this tag. The <li> must be used inside this tag.
It is available in the previous versions of HTML.
It supports both Global Attributes and Event Attributes in HTML5.

Limitations:

It is applicable to all the browsers.

Ask Questions

Ask Question