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.


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:


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.