compact (HTML attribute)
| Depr. | Version |
|---|---|
| Yes | HTML 2 |
| IE8 | FF3.5 | SA4 | OP10 | CH2 |
|---|---|---|---|---|
| None | None | None | None | None |
Syntax
Description
The
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.
Example
This example shows the
compact attribute applied to the report menu list
shown earlier:
<menu compact="compact"> <li>Main menu</li> <li>Introduction</li> <li>Executive summary</li> </menu>
Value
The attribute’s only acceptable
value is "compact".
Compatibility
| Internet Explorer | Firefox | Safari | Opera | Chrome | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 5.5 | 6.0 | 7.0 | 8.0 | 1.0 | 1.5 | 2.0 | 3.0 | 3.5 | 1.3 | 2.0 | 3.1 | 4.0 | 9.2 | 9.5 | 10.0 | 2.0 |
| None | None | None | None | None | None | None | None | None | None | None | None | None | None | None | None | None |
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.
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.