CodesJava

Easy learning with example program codes

Dir HTML

HTML <dir> Tag

The HTML <dir> tag is not supported in HTML5. It acts as a container for a list of files, folders or directory’s contents. It is used with the <li> tags to display the list of directories in bullets. Instead of the HTML <dir> tag, the <ul> tag and CSS property can be used.

Syntax:

<dir>Directory List</dir>

Example:

<!DOCTYPE html>
<html>
<body>
<h4>Grocery List</h4>
<dir>
<li>Rice</li>
<li>Bread</li>
<li>Flour</li>
<li>Oil</li>
<li>Cheese</li>
</dir>
</body>
</html>

Output:

Explanation:

In the above example, we created a Grocery List using the HTML <dir> tag.

Tag specific Attribute:

AttributeUses
compactUsed to define that the list should be displayed smaller than normal.Not supported in HTML5.

Supporting Browsers:

Chrome, IE, Firefox, Opera and Safari.

Please follow and like us:
error
Posted in HTML   









Copyright © 2019 CodesJava DMCA.com Protection Status