HTML<ol> reversed Attribute

Last Updated : 23 May, 2026

The HTML <ol> reversed attribute is used to display the ordered list in descending order instead of ascending order.Syntax: 

  • Used with the <ol> tag.
  • List numbering starts from the highest value and decreases.
  • Helpful for countdowns, rankings, or reverse sequences.

Syntax:

<ol reversed>
<li> Content... </li>
<li> Content... </li>
...
<li> Content... </li>
</ol>
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 ol 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>
  • <ol reversed>: Creates a numbered list in reverse order, starting from the highest number.
  • Content: Lists computer subjects (Data Structures, OS, Python, DBMS, Computer Network) under a green, italic “GeeksforGeeks” heading.
Comment