Breaking

Wednesday, May 1, 2019

HTML dir Tag

Example

A directory list:
<dir>
  <li>html</li>
  <li>xhtml</li>
  <li>css</li>
</dir>
Try it Yourself »

Definition and Usage

The <dir> tag is not supported in HTML5. Use <ul> or CSS instead.
The <dir> tag is used to list directory titles.

Browser Support

Element
<dir>YesYesYesYesYes

Tips and Notes

Tip: Use CSS to style lists! In our CSS tutorial you can find more details about styling lists.

Differences Between HTML 4.01 and HTML5

The <dir> tag is not supported in HTML5.

Optional Attributes

AttributeValueDescription
compactcompactNot supported in HTML5.
Specifies that the list should render smaller than normal

No comments:

Post a Comment