English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
The deprecated HTML directory element (<dir>) is used as a file and/or folder directory container, there may also be styles and icons applied by the user agent. Do not use this element. Although it appeared in early HTML specifications, it has been deprecated in HTML4 has been deprecated and is also deprecated in HTML5 is deprecated. Use <ul> instead.
Directory List:
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Basic Tutorial(oldtoolbag.com)</title> </head> <body> <dir> <li>html</li> <li>xhtml</li> <li>css</li> </dir> </body> </html> </html>Test and see ‹/›
IEFirefoxOperaChromeSafari
All mainstream browsers support the <dir> tag.
HTML5 The <dir> tag is not supported. Please use CSS instead.
In HTML 4.01 In, the <dir> element is deprecated.
The <dir> tag is used to define directory lists.
Tip:Use CSS to add styles to the list! You can find more aboutAdd styles to the listdetails.
HTML5 The <dir> tag is not supported, HTML 4.01 The <dir> tag is deprecated.
Attribute | Value | Description |
---|---|---|
compact | compact | HTML5 Not supported. HTML 4.01 Deprecated. The specified list must be presented one size smaller than the conventional state. |
In HTML 4.01 The <dir> tag supports the following standard attributes:
Attribute | Value | Description |
---|---|---|
class | classname | The class name of the specified element |
dir | rtl ltr | The text direction of the content within the specified element |
id | id | Specify the unique id of the element |
lang | language_code | Specify the language code for the content within the element |
style | style_definition | Specify the inline style of the element |
title | text | Specify additional information for the element |
For a complete description, please visitStandard Attributes.
In HTML 4.01 In, the <dir> tag supports the following event attributes:
Attribute | Value | Description |
---|---|---|
onclick | script | Execute script when the mouse is clicked |
ondblclick | script | Execute script when the mouse is double-clicked |
onmousedown | script | Execute script when the mouse button is pressed |
onmousemove | script | Execute script when the mouse pointer moves |
onmouseout | script | Execute script when the mouse pointer moves out of an element |
onmouseover | script | Execute script when the mouse pointer hovers over an element |
onmouseup | script | Execute script when the mouse button is released |
onkeydown | script | Execute script when the keyboard is pressed |
onkeypress | script | Execute script when the keyboard is pressed and then released |
onkeyup | script | Execute script when the keyboard is released |
For a complete description, please visitEvent Attributes.