reversed
reversed attribute
The reversed
attribute is a Boolean attribute used in the <ol>
(ordered list) element in HTML. When included, it indicates that the list should be numbered in descending order, starting from the total number of items down to 1. This is useful for reverse rankings or countdowns, highlighting important items at the end.
Syntax
<ol reversed>
Example
- Add sugar and milk (optional).
- Pour hot water over the coffee grounds.
- Place a coffee filter in the dripper.
- Grind coffee beans.
<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>
Definition and Usage
The reversed
attribute is a boolean attribute.
When included, it sets the list order to descending (9, 8, 7...) instead of ascending (1, 2, 3...).
Values
The reversed
attribute is a boolean attribute, meaning it doesn't require any associated values when used.
Applies To
The reversed
attribute can be applied to the following HTML elements:
Conclusion
The reversed
attribute is used with the <ol>
element to display list items in descending order. It is a boolean attribute and does not require a value. This is useful for applications like countdowns or reverse rankings.