Tag dir

The <dir> tag was originally used in early versions of HTML to represent a list of directory items, like a list of file names or folders. It functioned similarly to the <ul> (unordered list) element.

However, it has been deprecated and is no longer supported in modern HTML.


❌ Obsolete Status

  • The <dir> tag was deprecated in HTML 4.01.
  • It was removed in HTML5.
  • Modern browsers either treat it like a <ul> or ignore it.
  • You should not use <dir> in new HTML documents.

✅ Recommended Alternative

Use the <ul> (unordered list) instead:

<ul>
<li>Documents</li>
<li>Downloads</li>
<li>Pictures</li>
</ul>

This is the modern and valid way to list items.


🧠 Why It Was Deprecated

  • <dir> had no real difference from <ul> in behavior.
  • Its intended purpose (file lists) was too narrow.
  • It didn’t add semantic value or accessibility improvements.

✅ Summary

Tag<dir>
PurposeOriginally for directory lists
Status❌ Obsolete in HTML5
Replaced by✅ <ul> (unordered list)
SupportVery limited; not recommended