CSS
Height & Width

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.

Dimensions Properties

The possible properties can be used to set dimensions are as follows:

PropertyDescription
heightIt specifies the height of an element.
widthIt specifies the width of an element.
max-heightIt specifies the maximum height of an element.
max-widthIt specifies the maximum width of an element.
min-heightIt specifies the minimum height of an element.
min-widthIt specifies the minimum width of an element.

Dimensions Example

Below examples will demonstrate the basic architecture of height ∓ width

Basic Syntax:

h1{
   height:40px;
  width:30px; 
}

Example:

<!doctype html>  
<html>
    <head>
        <title>...</title>
    </head>
  
    <body>
       <h1 style="height:40h1x; width:30px;">PHPDocs</h1>
    </body>
</html>