<dir>
HTML <dir> Tags - HTML5 Not supported
##Instance
Run instance»Click the "Run instance" button to view the online instance
<!DOCTYPE html> <html> <body> <dir> <li>html</li> <li>xhtml</li> <li>css</li> </dir> </body> </html>
Run instance»Click the "Run instance" button to view the online instance
Browser support
##All major browsers support the <dir> tag.
Tag definition and usage instructionsHTML5 does not support the <dir> tag. Please use CSS instead.
In HTML 4.01, the <dir> element is deprecated.
<dir> tag is used to define directory listings.
Tips and NotesTips:
Please use CSS to style the list! You can find more details on styling lists in our CSS tutorial.
Differences between HTML 4.01 and HTML5HTML5 does not support the <dir> tag, and HTML 4.01 has deprecated the <dir> tag.
Optional attributesValue | Description | |
---|---|---|
compact | HTML5 Not supported. HTML 4.01 is deprecated. | Specifies that the list must be presented one size smaller than the normal state. |
Standard attributes
In HTML 4.01, the <dir> tag supports the following standard attributes:
Value | Description | |
---|---|---|
classname | Specifies the class name of the element | |
rtl | ltrSpecifies the text direction of the content in the element | |
id | Specifies the uniqueness of the element id | |
language_code | Specifies the language code of the content in the element | |
style_definition | Specifies the inline style of the element | |
text | Specifies additional information for elements |
Attributes | Value | Description |
---|---|---|
onclick | script | When the mouse is clicked Execute script |
ondblclick | script | Execute script when the mouse is double-clicked |
onmousedown | script | Execute script when mouse button is pressed |
onmousemove | script | Execute script when mouse pointer moves |
onmouseout | script | Execute the script when the mouse pointer moves out of an element |
onmouseover | script | When the mouse pointer hovers over Execute the script when on an element |
onmouseup | script | Execute the script when the mouse button is released |
onkeydown | script | Execute script when the keyboard is pressed |
#script | Execute script when the keyboard is pressed and then released||
script | Execute script when the keyboard is released