W3 3.2y
4.0d
NS 3.0y
4.0y
IE 3.0y
4.0y
TV 1.2y
2.1y

<DIR>...</DIR>

Description

Create a directory list. Items in the list are defined with the LI element.
This list is intended to be shown as a multicolumn directory list, but most browsers render a DIR list the same as an unordered list (UL).

DTD

Note: This element is deprecated, and this DTD fragment is taken from the
      Transitional DTD.

<!ELEMENT DIR - - (LI)+ -(%block;)     -- directory list, menu list -->
<!ATTLIST DIR
  %attrs;                              -- %coreattrs, %i18n, %events --
  compact     (compact)      #IMPLIED
  >
from the HTML 4.0 DTD, "Copyright © W3C, (MIT, INRIA, Keio). All Rights Reserved."

Attributes

Core attributes: class id style title
Internationalization attributes: dir lang
Events: onclick ondblclick onmousedown onmouseup onmouseover onmousemove onmouseout onkeypress onkeydown onkeyup

W3 3.2y
4.0d
NS 3.0n
4.0n
IE 3.0n
4.0n
TV 1.2n
2.1n
COMPACT
Show the list in a compact way, taking up less space. How this is done, in not defined in HTML 4.0.
W3 3.2n
4.0n
NS 3.0y
4.0y
IE 3.0n
4.0n
TV 1.2n
2.1n
TYPE
The default directory list has a default progression of bullet types that changes as you move through indented levels. From a solid disc, to a circle to a square.
You can change this default using the TYPE attribute. Allowed values for TYPE, are CIRCLE, DISC, and SQUARE.

Examples

Source
A simple directory list :
<DIR>
<LI>The first item of the list.
<LI>The second item of the list.
</DIR>
 
Result
A simple directory list :
  • The first item of the list.
  • The second item of the list.
  •  
    Source
    Nested directory lists with assigned types :
    <DIR type="square">
    <LI>The first item of the list.
    <LI>The second item of the list.
    <DIR type="circle" compact>
    <LI>The first item of the nested list.
    <LI>The second item of the nested list.
    </DIR>
    </DIR>
     
    Result
    Nested directory lists with assigned types :
  • The first item of the list.
  • The second item of the list.
  • The first item of the nested list.
  • The second item of the nested list.
  • Statistics