<dir> tag

HTML <dir> tag

The  <dir> tag describes directory list. It contains  the <li> tag to show the list of items(files or folders) inside the directory.

HTML5 does not support the <dir> tag, so it is better to use the <ul> tag.

The other alternative is to use CSS properties instead.

Syntax:
<dir> content…</dir>

Example

<dir>
  <li>jasmine</li>
  <li>sunflower</li>
  <li>lotus</li>
</dir>

Default CSS Value

NONE

How Browser will display

BLOCK Level.

Difference between HTML4.01, XHTML and HTML5

HTML4 XHTML HTML5
No Difference No Difference deprecated

Attributes used with comment tag

NONE

Global Attributes

The <dir> tag supports the Global attributes.

Event Attributes

The <dir> tag supports the Event attributes.

Supporting Browsers

supporting-browsers for tags

Related Tags

<ul> & <li> tags.

Tutorials for all brains!