HTML Tag Reference - HTML tag <dir>








The <dir> tag lists directory titles.

Browser compatibility

<dir> Yes Yes Yes Yes Yes

What's new in HTML5

The dir tag is deprecated in HTML5.

Attribute

compact
Value:compact
Not supported in HTML5. Layout list in a more compat way.

Example

<!DOCTYPE html>
<html>
<body>

<dir>
  <li>A</li>
  <li>B</li>
  <li>C</li>
</dir>

</body>
</html>