I've always kinda wondered why you couldn't reverse ordered lists in HTML, especially given people's propensity for counting down in "top ten" lists. Via The WHATWG Blog, Lachlan Hunt shares the news that ordered lists can be reversed in HTML 5:
These are the same as ordered lists, but instead of counting up from 1, they instead count down towards 1. This can be used, for example, to count down the top 10 movies, music, or LOLCats, or anything else you want to present as a countdown list.
Through the use of a reversed and an optional start attribute on the ol tag, one can reverse an ordered list and even dictate what number the list starts counting down from. A key thing to remember is that in XHTML, the attribute has to be used somewhat redundantly, by specifying reversed="reversed".
Head on over to The WHATWG Blog for all the details, including some examples of the new feature put into use in various ways.
Comments
No one has added any comments.
Post Comments
If you feel like commenting on the above item, use the form below. Your email address will be used for personal contact reasons only, and will not be shown on this website.