compact (HTML attribute)
Example
Here’s
compact applied to the maintenance instructions we
saw earlier:
<ol compact="compact"> <li>Remove the outer casing by pushing the plastic rivets through.</li> <li>Disconnect the main power harness from the inner unit (unclip).</li> <li>Remove connection to the glow plug.</li> <li>Extract unit, keeping upright at all times.</li> </ol>
Description
The
compact attribute’s purpose is to instruct the
browser to render the unordered 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 should not be used—it is presented here for informational purposes only.
Value
The only acceptable value is
"compact".
Compatibility
| IE | 5.5 | None |
|---|---|---|
| 6.0 | None | |
| 7.0 | None | |
| Firefox | 1.0 | None |
| 1.5 | None | |
| 2.0 | None | |
| Safari | 1.3 | None |
| 2.0 | None | |
| 3.0 | None | |
| Opera | 9.2 | None |
| 9.5 | None |
Very poor support is
provided for this attribute (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.
User-contributed notes
There are no comments yet.
Add a note
To post a note on this topic, please log in with your SitePoint username and password. If you don't have an account yet, you can create a new account for free.

