Use the dir tag in HTML to display directory list. This is very similar to <ul> tag but do not use <dir> since it is deprecated now.
The following is the attribute −
Attribute | Value | Description |
---|---|---|
Compact | compact | Deprecated − Specifies a compact rendering. |
Example
You can try to run the following code to show a directory list in HTML −
<!DOCTYPE html> <html> <head> <title>HTML dir Tag</title> </head> <body> <p>The following are the values:</p> <dir> <li>car</li> <li>bike</li> <li>ship</li> </dir> </body> </html>