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>Tajikistan</li>
<li>Poland</li>
<li>Belgium</li>
<li>Tunisia</li>
<li>Yemen</li>
<li>Palestinian Territories</li>
<li>Tuvalu</li>
<li>Moldova</li>
<li>Belize</li>
<li>Slovenia</li>
<li>Estonia</li>
<li>South Africa</li>
<li>Costa Rica</li>
<li>India</li>
<li>Norway</li>
<li>Palestinian Territories</li>
</ol>

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