w3c icon + 2.0 3.0 3.2 4.0
Netscape icon 1.0 2.0 3.0 4.0  
MSIE icon 1.0 2.0 3.0 4.0  
Mosaic icon 1.0 2.0      
Opera 1.0 2.1 3.0    
WebTV 0.9 1.2      

<dir>

deprecated
container
CSS: block element
start tagrequired
end tagrequired
Sandia Reference
Link to Site Map

Previous versions of HTML have declared <dir> as deprecated. HTML 4.0 does not, instead it recommends the use of <ul>. However, it does show the entire compliment of "standard" attributes. Go figure!

The DIR tag encloses a list of items with a maximum width of 20 characters. (classical description) The intent is that a browser can render this in columns of 24 characters wide. The <DIR> list uses the <li> tags to identify each item in the list.

Example:
<dir>
<lh>Heading
<li>first item
<li>second item
<li>third item
</dir>

Heading
  • first item
  • second item
  • third item

  • align= causes horizontal alignment directed by the argument.
    "left" causes the caption to be drawn flush left of the table or figure.
    <dir align="left">
    <lh>heading
    <li>item 1
    <li>item 2
    <li>item 3
    </dir> heading
  • item 1
  • item 2
  • item 3
  • "right" causes the caption to be drawn flush right of the table or figure. <dir align="right">
    <lh>heading
    <li>item 1
    <li>item 2
    <li>item 3
    </dir> heading
  • item 1
  • item 2
  • item 3
  • "center" causes the caption to be horizontally centered relative to the centerline of the table or figure. <dir align="center">
    <lh>heading
    <li>item 1
    <li>item 2
    <li>item 3
    </dir> heading
  • item 1
  • item 2
  • item 3
  • "justify" causes the text to be flush left and right. <dir align="justify">
    <lh>heading
    <li>item 1
    <li>item 2
    <li>item 3
    </dir> heading
  • item 1
  • item 2
  • item 3
  • class=
    w3c icon + 2.0 3.0 3.2 4.0
    Netscape icon 1.0 2.0 3.0 4.0  
    MSIE icon 1.0 2.0 3.0 4.0  
    compact=
    deprecated
    w3c icon + 2.0 3.0 3.2 4.0
    MSIE icon 1.0 2.0 3.0 4.0  
    WebTV 0.9 1.2      

    the intention of this attribute is to reduce the white space between each item in the list. Few browsers recognize it. <dir compact>
    <lh>heading
    <li>item 1
    <li>item 2
    <li>item 3
    </dir> heading
  • item 1
  • item 2
  • item 3
  • dir=
    w3c icon + 2.0 3.0 3.2 4.0
    "ltr"
    "rtl"
    id=
    w3c icon + 2.0 3.0 3.2 4.0
    Netscape icon 1.0 2.0 3.0 4.0  
    MSIE icon 1.0 2.0 3.0 4.0  
    index=
    w3c icon + 2.0 3.0 3.2 4.0
    lang=
    w3c icon + 2.0 3.0 3.2 4.0
    Netscape icon 1.0 2.0 3.0 4.0  
    MSIE icon 1.0 2.0 3.0 4.0  
    list of language codes
    list of country codes
    style=
    w3c icon + 2.0 3.0 3.2 4.0
    Netscape icon 1.0 2.0 3.0 4.0  
    MSIE icon 1.0 2.0 3.0 4.0  
    title=
    w3c icon + 2.0 3.0 3.2 4.0