HTML dir Tag

HTML dir Tag

HTML dir Tag was used to make a list of directory titles. It was used in HTML4. It is not supported in HTML5. You should use HTML ul tag instead.

Syntax of HTML dir Tag

The Syntax of HTML dir Tag is shown below, It has both starting and ending tags.


<dir>HTML</dir>

Usage of HTML dir Tag

HTML dir Tag was used to specify directory titles. Since it is deprecated now so you should use ul tag instead.

Example of HTML dir Tag

Simple example of HTML dir Tag is shown below.

<dir>
<li>HTML</li>
<li>CSS</li>
<li>JavaScript</li>
</dir>

Output

The output of above HTML code is shown below.

  • HTML
  • CSS
  • JavaScript
  • Browser Support for HTML dir Tag

    HTML dir Tag is supported by all major browsers.

    Global Attributes Support in HTML dir Tag

    The HTML dir Tag supports all Global Attributes.

    Event Attributes Support in HTML dir Tag

    The HTML dir Tag supports all Event Attributes.

    Post a Comment

    Previous Post Next Post