HTML <ul> compact attribute
HTML <ul> tag
Example
Use of the compact attribute in an unordered HTML list:
<ul compact="compact">
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ul>
|
Try it yourself!
|
Definition and Usage
The compact attribute specifies that the list should render smaller than normal, by
reducing the space between lines and the indentation of the list.
Browser Support

Note: The compact attribute is not supported by any of the major browsers.
Compatibility Notes
The compact attribute of the ul element was deprecated in HTML 4.01,
and is not supported in XHTML 1.0 Strict DTD.
Use CSS instead.
CSS syntax: <ul style="line-height: 80%">
CSS
Example: reduce line-height in a list
In our CSS tutorial you can find more details about the line-height property.
Syntax
Attribute Values
Value |
Description |
compact |
Specifies that the list should render smaller than normal |
HTML <ul> tag
 |

|
|
See why there are 20,000+ Ektron integrations worldwide.
Request an INSTANT DEMO or download a FREE TRIAL today. |
|
|
|