Tuesday 22 January 2013

compact

Use of the compact attribute in an ordered HTML list:

code:

<html>
<title> compact </title>
<body>
<ol compact>
  <li>Coffee</li>
  <li>Tea</li>
  <li>Milk</li>
</ol>
</body>
</html>



output:
  1. Coffee
  2. Tea
  3. Milk

Definition and Usage

The <ol> compact attribute is not supported in HTML5. Use CSS instead.

The compact attribute of <ol> is deprecated in HTML 4.01.
The compact attribute is a boolean attribute.
When present, it specifies that the list should render smaller than normal, by reducing the space between lines and the indentation of the list.


No comments:

Post a Comment