HTML <dir> Tag

Not supported in HTML5.

<dir> The tag is used in HTML 4 to list directory titles.

What to use instead?

Example 1

Use <ul> to create a directory list:

<ul>
  <li>html</li>
  <li>xhtml</li>
  <li>css</li>
</ul>

Try it yourself

Example 2

Reduce the line height in the list (using CSS):

<ul style="line-height:80%">
  <li>html</li>
  <li>xhtml</li>
  <li>css</li>
</ul>

Try it yourself

Tip:In our CSS tutorial, you can learn aboutSet List Styles. More content.