Example

A simple height property example:

Laboratory

description & Usage

To determine the height of an element, we use the height property.

Informations

# Description
Default Value auto
Inherited no
Animatable yes
Version CSS1
JavaScript syntax object.style.height="500px"

Browser compatibility and Support

# Chrome Edge Firefox Safari Opera
height

Syntax

Values

Values Description
auto default
length Determines the distance in centimeters, pixels, etc.
% Calculates the distance as a percentage.
initial Adds this value to its default property.
inherit It inherits this value from its parent tag.