It is a Boolean Attribute and is used to order the list in Descending Order(9, 8, 7, 6 …..) instead of ascending order(1, 2, 3 ….).
Syntax:
<ol reversed>
<li> Content... </li>
<li> Content... </li>
...
<li> Content... </li>
</ol>
Applicable:
<ol>
Attributes: It includes single attributes reversed. It is a Boolean attribute that specifies the list in descending order.
Example:
html
<!DOCTYPE html>
< html >
< head >
< title >reversed attribute</ title >
< style >
h1, h2 {
text-align:center;
}
</ style >
</ head >
< body >
< h1 style = "color:green;font-style:italic;" >
GeeksforGeeks
</ h1 >
< h2 style = "color:green;font-style:italic;" >
HTML reversed attribute
</ h2 >
< p >List of all computer Subjects are</ p >
< ol reversed>
< li >Data Structures</ li >
< li >Operating System</ li >
< li >python programming</ li >
< li >DBMS</ li >
< li >Computer Network</ li >
</ ol >
</ body >
</ html >
|
Output:

Supported Browsers: The browser supported by HTML reversed attributes are listed below:
- Google Chrome 18.0 and above
- Edge 79.0 and above
- Firefox 18.0
- Opera
- Safari 6.0 and above
Whether you're preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape,
GeeksforGeeks Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we've already empowered, and we're here to do the same for you. Don't miss out -
check it out now!
Last Updated :
04 Aug, 2023
Like Article
Save Article