Please note, this is a STATIC archive of website www.w3schools.com from 05 May 2020, cach3.com does not collect or store any user information, there is no "phishing" involved.
THE WORLD'S LARGEST WEB DEVELOPER SITE

HTML <dir> Tag


Not Supported in HTML5.

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


What to Use Instead?

Example

Use <ul> to create a directory list:

<ul>
  <li>html</li>
  <li>xhtml</li>
  <li>css</li>
</ul> 
Try it Yourself »

Example

Reduce line-height in a list (with 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 find more details about styling lists.