Skip to content
Related Articles

Related Articles

HTML | <dir> compact Attribute
  • Last Updated : 30 Jul, 2019

The HTML <dir> compact Attribute is used to define the list should be smaller than the normal by reducing the space between the list items and the indentation of the list. It is a Boolean attribute.


<dir compact>

Below example illustrates the use of <dir> compact attribute.


<!DOCTYPE html> 
        HTML dir compact Attribute 
        .gfg { 
        .geeks { 
    <div class = "gfg">GeeksforGeeks</div
    <div class = "geeks">
        HTML <dir> compact Attribute
    <p>List of all computer science subjects:</p
    <dir compact> 
        <li>Operating system</li
        <li>Data Structures</li
        <li>computer network</li


Supported Browsers: The HTML <dir> compact attribute is not supported by any browsers.


My Personal Notes arrow_drop_up
Recommended Articles
Page :