HTML
The compact attribute
Example
Using the compact attribute in a directory list:
Try it »
Browser support





Note: Currently no major browser supports the compact attribute.
Definition and Usage
The compact attribute is a boolean attribute.
The compact attribute specifies that the list should be rendered more compactly than normal, by reducing line spacing and indenting the list.
Compatibility notes
CSS syntax:
CSS example: reducing the line height in a list
In our CSS tutorial, you can find more details about line-height propertyDetails of the attribute.
Differences between HTML and XHTML
In XHTML, attribute minimization is not allowed, and the compact attribute must be defined as:
Syntax
HTML