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:
- Coffee
- Tea
- 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