The HTML <dir> tag is used for specifying a directory list. This is very similar to <ul> tag but now this is deprecated.
<!DOCTYPE html> <html> <head> <title>HTML dir Tag</title> </head> <body> <dir> <li>dir</li> <li>menu</li> <li>ul</li> </dir> </body> </html>
This will produce the following result −
This tag supports all the global attributes described in HTML Attribute Reference
The HTML <dir> tag also supports the following additional attributes −
Attribute | Value | Description |
---|---|---|
compact | compact | Deprecated − Specifies a compact rendering. |
This tag supports all the event attributes described in HTML Events Reference
Chrome | Firefox | IE | Opera | Safari | Android |
---|---|---|---|---|---|
Yes | Yes | Yes | Yes | Yes | Yes |