ExampleA directory list: | Browser Support |
1. Definition and Usage
The <dir> tag is not supported in HTML5. Use CSS instead.
The <dir> element is deprecated in HTML 4.01.
The <dir> tag is used to list directory titles.
2. Tips and Notes
Tip: Use CSS to style lists.
3. Differences Between HTML 4.01 and HTML5
The <dir> tag is not supported in HTML5, and is deprecated in HTML 4.01.
4. Optional Attributes
DTD indicates in which HTML 4.01/XHTML 1.0 DTD the attribute is allowed. S=Strict, T=Transitional, and F=Frameset.
Attribute | Value | Description | DTD |
---|---|---|---|
compact | compact | Deprecated. Use styles instead. Specifies that the list should render smaller than normal | TF |
5. Standard Attributes
The <dir> tag supports the Standard Attributes in HTML.
6. Event Attributes
The <dir> tag also supports the Standard Event Attributes in HTML.