HTML reversed Attribute: This attribute is defined as a boolean attribute. It specifies that the list order should be descending instead of ascending.
HTML reversed Attribute
This attribute can be applied on <ol> element.
Syntax:
<ol reserved>
<li> Content… </li>
<li> Content… </li>
…
<li> Content… </li>
</ol>
Browser Support
The reverse attribute is supported by the following browsers:
- Chrome-18.0
- Internet Explorer-does not support
- Safari-5.2
- Opera
- Firefox-18.0
Example: for <ol> element
<!DOCTYPE html> <html> <body> <ol reversed> <li>C</li> <li>C++</li> <li>HTML</li> </ol> </body> </html>
Output:
3. HTML
2. C++
1. C
Note: The reversed attribute of the ol tag is not supported in Internet Explorer and Safari 5.1 (and earlier versions).