Reverse Ordered Lists in HTML5

Display the numbers of your lists in descending order using HTML5

Using the new reversed attribute, you can tell the browser that the numbering for the list items should display in descending order, instead of the default ascending. The items will still appear in the same order as they appear in the markup, but the numbers will begin with the highest. So if you have 10 list items, then the first list item will display with a number 10, and the second with a number 9, and so forth.

 

The syntax is simple, you just add the reversed attribute to any element. This attribute is a Boolean attribute, so it doesn’t take any value. If you’re using an XHTML doctype, you would need to do reversed to pass validation.

Daniela Vaseva

Daniela VasevaDaniela is writing tutorials, news, newsletters, and update emails for the DMXzone specialising in the sphere of electronic processing, analysis and publication of texts, and interested in the development of new Internet technologies and problems related to the cyberculture and net literature. She has a bachelor's degree in Bulgarian philology, and a master's degree in computational linguistics.

See All Postings From Daniela Vaseva >>

Comments

Be the first to write a comment

You must me logged in to write a comment.