How do we specify that the list order should be descending (9,8,7, 6, 5...) in HTML?

HTMLWeb DevelopmentFront End Technology

Use the reversed attribute in HTML to specify that the list order should be descending.

Example

You can try to run the following code to implement reversed attribute −

<!DOCTYPE html>
<html>
   <body>
   <h3>Cricketers List</h3>
      <ol reversed>
         <li>Amit</li>
         <li>Amal</li>
         <li>Rahul</li>
         <li>Virat</li>
      </ol>
   </body>
</html>
raja
Published on 14-Mar-2018 14:46:43
Advertisements