Name
dir — HTML 4.01
Synopsis
<dir> . . . </dir>
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.
Notes
Deprecated in HTML 4.01/XHTML 1.0. Not in HTML5.
Start/End Tags
Required/Required
Attributes
Core, Internationalization, Events, HTML5 Global Attributes
compact
(compact="compact"
in XHTML)Deprecated. Not in HTML5. Makes the list as small as possible. Few browsers support the
compact
attribute.
Example
<dir> <li>index.html</li> <li>about.html</li> <li>news.html</li> </dir>
Get HTML & XHTML Pocket Reference, 4th Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.