CSS Portal

HTML reversed Attribute

If this site has been useful, we’d love your support! Consider buying us a coffee to keep things going strong!

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

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 information will show you the current browser support for the HTML reversed attribute. Hover over a browser icon to see the version that first introduced support for this HTML attribute.

This attribute is supported by all modern browsers.
Desktop
Chrome
Edge
Firefox
Opera
Safari
Tablets & Mobile
Chrome Android
Firefox Android
Opera Android
Safari iOS
Samsung Internet
Android WebView
-

Last updated by CSSPortal on: 29th March 2024

If this site has been useful, we’d love your support! Consider buying us a coffee to keep things going strong!