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

Live Demo
<!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 −

Global Attributes

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

Specific Attributes

The HTML <dir> tag also supports the following additional attributes −

Attribute Value Description
compact compact Deprecated − Specifies a compact rendering.

Event Attributes

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

Browser Support

Chrome Firefox IE Opera Safari Android
Yes Yes Yes Yes Yes Yes

html_tags_reference.htm

Advertisements