HTML - <dir>

The HTML directory element (<dir>) represents a directory, namely a collection of filenames.

Description  

The HTML directory element (<dir>) represents a directory, namely a collection of filenames.

Usage note: Do not use this element. Though present in the early HTML specification, it has been deprecated in HTML 4, then is obsolete in HTML5. Use the <ul> instead.

See Also  

  • Other list-related HTML Elements: <ol>, <ul>, <li>, <menu>;
  • CSS properties that may be specially useful to style the <dir> element:
    • The list-style property, useful to choose the way the ordinal is displayed.
    • CSS counters, useful to handle complex nested lists.
    • The line-height property, useful to simulate the deprecated compact attribute.
    • The margin property, useful to control the indent of the list.

 

This element implements the HTMLDirectoryElement interface.

License

© 2016 Mozilla Contributors
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-us/docs/web/html/element/dir

Element Élément HTML Obsolete Reference Référence Web