HTML ol compact property
Examples
Use compact attribute in an ordered HTML list:
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ol>
try it"
Browser Support
Note: Almost all of the major browsers do not support the compact attribute.
Definition and Usage
HTML5 does not support the <ol> compact property. Use CSS instead.
In HTML 4.01, <ol> The compact attribute obsolete .
compact attribute is a Boolean attribute.
compact attribute specifies the list of display should be smaller than normal, by reducing the line spacing and indentation of the list.
Compatibility Notes
In HTML 4.01, <ol> The compact attribute obsolete, please use CSS instead.
CSS Syntax: <ol style = "line-height: 80%">
CSS Example: to narrow the list row height
In our CSS tutorial you can find more information about the line-height attribute details.
Differences between HTML and XHTML
In XHTML, prohibit attribute minimization, compact property must be defined as <ol compact = "compact">.
grammar
HTML <ol> tag