dir

FilterElements

<dir> ... </dir>

Deprecated in HTML 4.01/XHTML 1.0. Not in HTML5. Creates a directory list consisting of list items (li). Directory lists were originally designed to display lists of files with short names, but they have been deprecated with the recommendation that unordered lists (ul) be used instead.

Start/End Tags

Required/Required

Specifications

  • HTML 4.01

compact

Values: None in HTML. compact="compact" in XHTML.
Deprecated. Not in HTML5. Makes the list as small as possible. Few browsers support the compact attribute.
<dir>
  <li>index.html</li>
  <li>about.html</li>
  <li>news.html</li>
</dir>

Rendered Example

  
  • index.html
  •   
  • about.html
  •   
  • news.html