<DIR> Tag & its Attribute
HTML Tag <DIR>
<DIR> Contains a directory list. Use the <LI> tag to indicate list items within the list. Use <UL>, rather than this deprecated tag.
Attribute of <DIR> Tag
CLASS
Indicates which style class applies to the <dir> element.
<DIR CLASS="casual">
<LI>Apples
<LI>Kiwis
<LI>Mangos
<LI>Oranges
</DIR>
Possible Values
Any Class name that you define.
COMPACT
Causes the list to appear in a compact format. This attribute probably will not affect the appearance of the list as most browsers do not present lists in more than one format.
<DIR COMPACT>ram is a good boy
</DIR>
Possible Values
Compact
ID
Assigns a unique ID selector to an instance of the <dir> tag. When you then assign a style to that ID selector, it affects only that one instance of the <dir> tag.
<DIR ID="dkm">
<LI>Thingie 1
<LI>Thingie 2
</DIR>
Possible Values
Any Id Name That you define.
STYLE
Specifies Style Sheet commands that apply to the <DIR> element.
<DIR STYLE="background: blue;
color: white">
<LI>Thingie 1
<LI>Thingie 2
</DIR>
Possible Values
CSS property with value.
TITLE
Specifies text assigned to the tag. You might use this attribute for context-sensitive help within the document. Browsers may use this to show tool tips over the directory list.
<DIR TITLE="Directory List">
Possible Values
Any Text Message.