Skip to main content

Reverse Numerical Order in HTML Lists

There are several methods you can use to reverse the ordering of numbers in an HTML list. One option is to use a script, which can easily be added to your web page and will automatically manipulate the number order without affecting your content. Another easier method is to use an HTML attribute supported by the ol tag.

To make ordered lists to count backward from higher to lower values, you only need to add the reversed attribute to the the ol HTML tag.

<ol reversed>
<li>Palestinian Territories</li>
<li>South Africa</li>
<li>Costa Rica</li>
<li>Palestinian Territories</li>

By continuing to use the site, you agree to the use of cookies.