Introduction to <dir>tag

The <dir>tag was introduced in the early days of HTML (HTML 2.0) to create multi-column directory listings, mainly for presenting lists of files or similar hierarchical content. However, with the evolution of HTML and web standards, the usage of the <dir>tag became less common. The tag was officially deprecated in HTML 4.01 and is not supported in HTML5. The deprecation is due to the tag's limited functionality and the availability of more versatile and semantic alternatives, such as <ul>, <ol>, and CSS for styling lists.

Warning: The <dir>tag is deprecated and no longer conforms to modern web standards. It should be avoided in current web development practices. Instead, use <ul>or <ol>for list structures, and apply CSS for styling and layout adjustments to maintain compatibility with modern web practices.

Deprecated: This feature is no longer recommended for use but while some browsers might still support it but it may have already been removed from web standards or it could be in the process of being phased out, it might only be retained for compatibility with older web projects and it's advisable to avoid using this feature and update your existing code wherever possible, refer to the compatibility table below for guidance and keep in mind that the feature may stop functioning in the future.

HTML AttributesGlobal AttributesEvent Attributes
To view the full list
To view the full list
To view the full list
elementsChrome BrowsersMicrosoft Edge BrowserFirefox BrowsersSafari BrowserOpera Browser
<dir>NoNoNoNoNo