compact attribute’s purpose is to instruct the
browser to render the directory list into a smaller text block by reducing
the spacing between lines and/or reducing the default indentation.
This attribute is now deprecated, and is highly presentational in its nature. The desired visual effects can all be achieved with CSS and, as such, this attribute shouldn’t be used—it’s presented here for informational purposes only.
This example shows
compact applied to the plants directory list shown
<dir compact="compact"> <li>shrubs</li> <li>conifers</li> <li>hedges</li> </dir>
The only acceptable value for
This attribute has
very poor support (that is, not a single browser responded to the
compact attribute), but given that it’s a
deprecated attribute and the desired effects can be achieved using CSS,
this shouldn’t cause any problems.