HTML <ol> compact Attribute

❮ HTML <ol> tag

Deprecated: Not Supported in HTML5.

Example

<ol compact>
  <li>One</li>
  <li>Two</li>
  <li>Three</li>
</ol>

Meaning

The compact attribute specifies that the list should be rendered in a compact style.

Few browsers actually change the rendering of the list, regardless of the presence of this attribute.

Note: The compact attribute requires no value under traditional HTML but under XHTML should be set to compact="compact".


Standard Syntax

HTML: <ol compact>
XHTML: <ol compact="compact">



Browser Support




Status







Attribute Values

Value Description
compact This is a boolean attribute, the presence of a boolean attribute on an element represents the true value, and the absence of the attribute represents the false value.
❮ HTML <ol> tag