HTML reversed Attribute
Description
The reversed
attribute is a Boolean attribute used in HTML within the <ol>
(ordered list) element. When present, it specifies that the list should be displayed in descending order, reversing the natural numbering sequence. This means that the list items are numbered starting from the total count of items down to 1. It is particularly useful for ranking or listing items in reverse order, such as in countdowns or lists where the most important items are placed last for emphasis.
For example, in an ordered list without the reversed
attribute, items would be numbered as 1, 2, 3, etc. However, with the reversed
attribute applied, if there are 3 items in the list, they would be numbered as 3, 2, 1, with the first item in the HTML code being displayed as number 3 and counting down. The attribute does not need a value; its presence alone on an <ol>
element is enough to apply the effect.
Syntax
<ol reversed>
Values
The reversed
attribute is a boolean attribute, therefore no values are associated with this attribute.
Applies To
The reversed
attribute can be used on the following html elements.
Example
<h2>Steps to Make Coffee</h2>
<ol reversed>
<li>Add sugar and milk (optional).</li>
<li>Pour hot water over the coffee grounds.</li>
<li>Place a coffee filter in the dripper.</li>
<li>Grind coffee beans.</li>
</ol>
Browser Support
The following table will show you the current browser support for the HTML reversed
Attribute.
Desktop | |||||
79 | 18 | 18 | 15 | 6 |
Tablets / Mobile | |||||
18 | 18 | 14 | 6 | 1 | 4.4 |
Last updated by CSSPortal on: 29th March 2024