height

Set the height of an element.

Value Description
size px - size in terms of pixels
em - size in terms of the current font size
in - size in terms of inches
cm - size in terms of centimeters
auto The browser will automatically choose the value.

Code:

p{
height: 60px;
border: 1px solid black;
}

Display:

This paragraph has a height of 60 pixels set with the height property. We have added a border around this paragragh so you may see the height easily.

Compatibility Issues:

IE 5.0 - Height can be buggy in IE 5.0.