HTML dir Tag

HTML <dir> Tag: The HTML<dir> tag specifies a list of directory files. It is not supported in HTML 5 so ul or CSS are used instead of HTML  dir  tag.

HTML <dir> Tag

Browser compatibility

The HTML<dir> tag is supported by different types of browsers.

  • Chrome,
  • Firefox
  • Opera,
  • Safari
  • Internet Explorer.


<!DOCTYPE html>


html dir tag

Attributes that are supported by the <dir> tag

Attribute Value Description
compact compact Describes that the list should render smaller than normal