Issue #10 - reversing ordered lists
published onYou can reverse ordered lists by using the reversed
attribute.
Ordered lists
- Curly Sue (1991)
- Uncle Buck (1989)
- She's Having a Baby (1988)
- Planes, Trains & Automobiles (1987)
- Ferris Bueller's Day Off (1986)
- Weird Science (1985)
- The Breakfast Club (1985)
- Sixteen Candles (1984)
With the reversed
attribute in place, the visual order of list items stays the same, but they are be numbered from high to low.
You can also combine the reversed
and start
attributes to change the number the list counts down from.
<ol reversed start="5">
<li>Fifth</li>
<li>Fourth</li>
<li>Third</li>
</ol>
- Fifth
- Fourth
- Third
Unordered lists
The attribute has no effect on unordered lists (ul
), even if you change the type.
<ul reversed type="1">
<li>Third</li>
<li>Second</li>
<li>First</li>
</ul>
- Third
- Second
- First
Resources
Did you enjoy this tip?
Sign up for the HTMHell newsletter and receive an HTML tip or trick every week via e-mail.