HTML ol Tag reversed Attribute Tutorial

In this section, we will learn what the reversed attribute is and how to use it.

What is reversed Attribute in HTML <ol> Tag?

By default, when creating a list with the <ol> element, the first item in the list will be rendered on top and the rest will follow under each other.

So the first item will appear with the number 1, the second element will take the value 2 and so on.

But with the help of `reversed` attribute, we can change this order from bottom to the top.

Basically, when applying the reversed attribute to an <ol> element, the last item in the list will take the first place and those on top will go to the end of the list.

HTML reversed Attribute in <ol> Tag Syntax:

<ol reversed> </ol>

<ol> Tag reversed Attribute Values

The reversed attribute is a boolean one and we only need to set this attribute in the opening tag of the <ol> element.

Example: using reversed attribute in HTML <ol> tag

See the Pen using reversed attribute in HTML <ol> tag by Omid Dehghan (@odehghan) on CodePen.

Facebook
Twitter
Pinterest
LinkedIn

Top Technologies