HTML Encyclopaedia

The dir tag

This is a rarely used list tag that generally has the same sort of effect as the <ul> tag.

Microsoft Word 97 uses multiple nested <dir> ... </dir> tags without <li> items to control text indentation when saving a word processed document in HTML.

The tag was intended to produce multi-column lists but no browser seems to do this, which is a pity. The only way to produce multi-column output is via tables which are much harder to maintain than a simple list.The list below is unlikely to change (unless Puerto Rico gets statehood) but would look much nicer in multi-column format. It could have been done as a table but this would be cumbersome for data that isn't really tabular in character.

Here's an example

  • Alabama
  • Alaska
  • Arizona
  • Arkansas
  • California
  • Colorado
  • Connecticut
  • Delaware
  • Florida
  • Georgia
  • Hawaii
  • Idaho
  • Illinois
  • Indiana
  • Iowa
  • Kansas
  • Kentucky
  • Louisiana
  • Maine
  • Maryland
  • Massachusetts
  • Michigan
  • Minnesota
  • Mississippi
  • Missouri
  • Montana
  • Nebraska
  • Nevada
  • New Hampshire
  • New Jersey
  • New Mexico
  • New York
  • North Carolina
  • North Dakota
  • Ohio
  • Oklahoma
  • Oregon
  • Pennsylvania
  • Rhode Island
  • South Carolina
  • South Dakota
  • Tennessee
  • Texas
  • Utah
  • Vermont
  • Virginia
  • Washington
  • West Virginia
  • Wisconsin
  • Wyoming
  • In general it does exactly the same thing as <ul>

    Browsers
    MOS3 and IE3 render the list with the same bullets as used for all levels of <ul> list. ARA and NN render the list with the same bullets as used for a top level <ul> list. OP2 renders the list without any bullets or other distinctive marks. All browsers produce a single column list. The compact attribute has no effect.


    See also<menu>, <ul> and general notes on lists.