You could rotate the parent element 180deg and then rotate the children elements -180deg.
ul {
transform: rotate(180deg);
}
ul > li {
transform: rotate(-180deg);
}
Example Here
Alternatively, you could use flex boxes along with the order property.
Although this isn't technically reversing the order, you could also use counter-increment along with a psuedo element.
Example Here
ul {
list-style-type:none;
counter-reset:item 6;
}
ul > li {
counter-increment:item -1;
}
ul > li:after {
content: counter(item);
}
Answer from Josh Crozier on Stack Overflow Top answer 1 of 6
90
You could rotate the parent element 180deg and then rotate the children elements -180deg.
ul {
transform: rotate(180deg);
}
ul > li {
transform: rotate(-180deg);
}
Example Here
Alternatively, you could use flex boxes along with the order property.
Although this isn't technically reversing the order, you could also use counter-increment along with a psuedo element.
Example Here
ul {
list-style-type:none;
counter-reset:item 6;
}
ul > li {
counter-increment:item -1;
}
ul > li:after {
content: counter(item);
}
2 of 6
66
You can use flexbox to achieve this. It allows you to reverse the order with the flex-direction property.
ol {
display: flex;
flex-direction: column-reverse;
}
li {
flex: 0 0 auto;
}
- spec
- live demo
- limited browser support
Manuel Matuzovic
matuzo.at › blog › reverse-ordered-lists
Reverse ordered lists - Manuel Matuzovic
If we don’t know the exact number of items, we can move the counter-reset property into our HTML and let our back-end programming language or our static site generator do the counting. <ol style="counter-reset: my-custom-counter {% raw %}{{ items.length + 1 }}{% endraw %}" > <li>C</li> <li>B</li> <li>A</li> </ol> ol { list-style: none; } ol li { counter-increment: my-custom-counter -1; } ol li::before { content: counter(my-custom-counter) '. '; } Some articles suggested reversing the order of both the list marker and the item itself in CSS using Flexbox or similar techniques.
W3Schools
w3schools.com › tags › att_ol_reversed.asp
HTML ol reversed Attribute
The reversed attribute is a boolean attribute. When present, it specifies that the list order should be descending (9,8,7...), instead of ascending (1, 2, 3...).
Clairecodes
clairecodes.com › blog › 2020-03-29-how-to-reverse-ordered-list-counters-in-html
How to Reverse Ordered List Counters in HTML · clairecodes
An explanation of the reversed attribute for ordered lists in HTML.
TutorialsPoint
tutorialspoint.com › html-ol-reversed-attribute
HTML reversed Attribute
The reversed attribute of the <ol> element in HTML is used to set reversed ordering of list items in an ordered list. It displays the numbering in descending order and introduced in HTML5. Following is the syntax −
GeeksforGeeks
geeksforgeeks.org › html › how-to-set-list-in-descending-order-in-html5
How to set list in descending order in HTML5 ? - GeeksforGeeks
July 23, 2025 - <!DOCTYPE html> <html> <body> <h2>Rank in Descending order</h2> <ol reversed> <li>Kapil</li> <li>sachin</li> <li>Will</li> <li>nikhil</li> <li>Aakash</li> <li>Steve</li> <li>Rahul</li> <li>Kane</li> <li>Rohan</li> <li>John</li> </ol> </body> </html> ... Example 2: Using the start attribute, you can specify at what number you want the list to begin.
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › HTML › Element › ol
<ol>: The Ordered List element - HTML | MDN
This Boolean attribute specifies that the list's items are in reverse order.
DotFactory
dofactory.com › html › ol › reversed
HTML ol reversed
In HTML, the reversed attribute on a tag reverses the numbering in the ordered list. The items themselves are not reversed; it‘s just the numbering.
Whatwg
blog.whatwg.org › reverse-ordered-lists
The WHATWG Blog — Reverse Ordered Lists
(Reverse numbering is possible, having the browser figure out the start number afaik isn’t.) the value attribute was not allowed in the HTML 4.01 or XHTML 1.0 Strict DOCTYPEs · Crikey, never realised that. Why not use the syntax start=”10″ step=”-1″? This would permit both reverse ...
Can I Use
caniuse.com › ol-reversed
Reversed attribute of ordered lists | Can I use... Support tables for HTML5, CSS3, etc
This attribute makes an ordered list number its items in descending order (large to small), instead of ascending order (small to large; the default).
Techfunda
techfunda.com › howto › 495 › reverse-list
Reverse list in HTML5 - Tech Funda
By using <listreverse> tag we can reverse the order of the ordered list. Below is the example code for the revrse order list. Noraml List <ol> <li>HTML 5</li> <li>CSS 3</li> <li>jQuery</li> <li>.NET</li> <li>Java</li> <li>PHP</li> </ol> <hr /> Noraml List and then continued <ol> <li>HTML 5</li> ...
Mrbool
mrbool.com › how-to-reverse-order-of-list-using-javascript-and-html › 26764
How to reverse Order of list using JavaScript and HTML
(It’s in the HTML5 spec, but might be a while before it’s generally usable.) The JavaScript could also be used to achieve adding spurious numbers to the margin and generally messing up the semantics of the list. We need to write a function that finds each ol element on the page that has the class “reversed”, and changes the “value” attribute of each li to the number it would have in a native reversed-order presentation.
CSS-Tricks
css-tricks.com › did-you-know-the-ordered-list-element-has-start-and-reversed-attributes
Did You Know the Ordered List Element Has Start and Reversed Attributes? | CSS-Tricks
March 25, 2020 - <ol reversed> <li>Apple</li> <li>Banana</li> <li>Pear</li> </ol> And the start attribute can be added to begin the list at a number other than one, like this: <ol start="2"> <li>Apple</li> <li>Banana</li> <li>Pear</li> </ol> I’m not sure how I never knew about these properties! I guess I can see how they might come in handy in the future. There are plenty of times when we need to break up ordered lists here on CSS-Tricks with things like code blocks and having a way to pick a list back up where it left off is a nice convenience.
SitePoint
sitepoint.com › html & css
Reversed Ordered List not working - HTML & CSS - SitePoint Forums | Web Development & Design Community
June 12, 2012 - <ol reversed> <li>List Item</li> <li>List Item</li> <li>List Item</li> <li>List Item</li> <li>List Item</li> </ol> yo could use this instead (though it requires manual labor): <ol> <li value="5">List Item</li> <li value="4">List Item</li> <li value="3">List Item</li> <li value="2">List Item</li> <li value="1">List Item</li> </ol> ... <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title></title> </head> <body> <ol> <li value="5">List Item</li> <li value="4">List Item</li> <li value="3">List Item</li> <li value="2">List Item</li> <li value="1">List Item</li> </ol> </body> </html>
YouTube
youtube.com › coding comics
Reversed Ordered List in Html - YouTube
In this video, I have explained reversed ordered list in html.#html #reversedorderlist #orderedlist
Published April 1, 2023 Views 896