HTML ol reversed AttributeThe HTML <ol> reversed Attribute is a Boolean Attribute and used to ordered the list in Descending Order(9, 8, 7, 6 …..) instead of ascending order(1, 2, 3 ….). Show Syntax: <ol reversed> <li> Content... </li> <li> Content... </li> ... <li> Content... </li> </ol>Example: html
Output: Supported Browsers:
Article Tags :
HTML Web Technologies
HTML-Attributes Practice Tags :
HTML HTML <ol> reversed Attribute❮ HTML <ol> tag ExampleDescending list order:
<ol reversed>
Try it Yourself »
HTML <ol> reversed AttributeHTMLWeb DevelopmentFront End Technology 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 − Let us now see an example to implement the reversed attribute of the <ol> element − <ol>: The Ordered List elementThe <ol> HTML element represents an ordered list of items — typically rendered as a numbered list.
HTML Ordered List | HTML Numbered ListHTML Ordered List or Numbered List displays elements in numbered format. The HTML ol tag is used for ordered list. We can use ordered list to represent items either in numerical order format or alphabetical order format, or any format where an order is emphasized. There can be different types of numbered list:
To represent different ordered lists, there are 5 types of attributes in <ol> tag.
Summary of the “reversed” AttributeAs mentioned, 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. At first, this confused me. I was under impression that this attribute would actually physically reverse the contents of the list. But that’s not the case. 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, the second with a number 9, and so forth. The syntax is simple, you just add the reversed attribute to any <ol> element. This attribute is a Boolean attribute, so it doesn’t take any value. The code (as if you needed an example!) looks like this: <ol reversed> <li>List item one</li> <li>List item two</li> <li>List item three</li> <li>List item four</li> <li>List item five</li> </ol>The result in the browser would be: |