HTML <dir> Tag

Advertisements


Description

The HTML <dir> tag is used for specifying a directory list. This is very similar to <ul> tag but now this is deprecated.

Example

<!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 following result:

  • dir
  • menu
  • ul
  • Global Attributes

    This tag supports all the global attributes described in - HTML Attribute Reference

    Specific Attributes

    The HTML <dir> tag also supports following additional attributes:

    AttributeValueDescription
    compactcompactDeprecated - Specifies a compact rendering.

    Event Attributes

    This tag supports all the event attributes described in - HTML Events Reference

    Browser Support

    ChromeFirefoxIEOperaSafariAndroid
    YesYesYesYesYesYes

    html_tags_reference.htm