Latest

recent

HTML dir compact Attribute

Definition and Usage

The compact attribute specifies that the spacing between lines and indentation of the list should be reduced.

Compatibility Notes

The compact attribute of the del element was deprecated in HTML 4.01 and is not supported in XHTML 1.0 Strict DTD.
Use CSS instead.
There is no CSS property that does the exact same thing that the compact attribute was supposed to do. However, the line-height property could be a suitable replacement.
CSS syntax: <dir style="line-height: 100%">

Syntax

<dir compact="compact">

Attribute Values

Value Description
compact Specifies a compact list.


Browser Support


The attribute is deprecated, not supported by major browsers, and should be avoided.

Example

Source Output
<dir compact="compact">
<li>Harry</li>
<li>Potter</li>
<li>Richard</li>
</dir>





  • Harry



  • Potter



  • Richard



  • HTML dir compact Attribute Reviewed by 1000sourcecodes on 05:10 Rating: 5
    Powered by Blogger.