Fandom

HTML & CSS Wiki

Dir

649pages on
this wiki
Add New Page
Comments0 Share

This deprecated element is not recommended. Authors should generally find an alternative way to accomplish the same task while adhering to all best practices, or simply do without it if it is unimportant.



The HTML <dir></dir> element was deprecated since HTML4 in favor of the <ul> and <ol> elements. It was used to define a directory list. It is obsolete in HTML5.

Attributes

Attribute Value Description
compact Boolean This Boolean attribute hints that the list should be rendered in a compact style. The interpretation of this attribute depends on the user agent and it doesn't work in all browsers.
Global Attributes

See Global HTML Attributes.


HTML example:

<dir>
<li>1
<li>2
<li>3
</dir>

External Links

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.