Height and width are dynamic dimensions of an element as they fluctuate in order to fit the content.
The width CSS property specifies the width of an element, and the height CSS property specifies the height of an element.
The possible properties can be used to set dimensions are as follows:
Property | Description |
---|---|
height | It specifies the height of an element. |
width | It specifies the width of an element. |
max-height | It specifies the maximum height of an element. |
max-width | It specifies the maximum width of an element. |
min-height | It specifies the minimum height of an element. |
min-width | It specifies the minimum width of an element. |
Below examples will demonstrate the basic architecture of height ∓ width
h1{ height:40px; width:30px; }
<!doctype html>
<html>
<head>
<title>...</title>
</head>
<body>
<h1 style="height:40h1x; width:30px;">PHPDocs</h1>
</body>
</html>