CSS

CSS Intro

CSS Intro Quiz

CSS Intro Exercise

CSS Basic

CSS Basic Quiz

CSS Basic Exercise

CSS Advance

CSS Advance Quiz

CSS Advance Exercise

CSS3

CSS3 Quiz

CSS3 Exercise

CSS Properties

CSS Functions

CSS Selectors

CSS height Property

CSS height Property

 

 

The height property is used to set the height of an element. It does not include padding, borders, or margins. If the height is set to auto, then, the element will automatically adjust its height to allow its content to be displayed correctly.

 

Default Value:-

 

Its default value is auto.

 

Syntax:-

 

Its syntax is:- height: auto | length | initial | inherit;

 

Further Explanation:-

 

Value Description
auto The browser calculates the height.
length Defines the height in px, cm, etc.
% Defines the height in percent of the containing block
initial Sets this property to its default value.
inherit Inherits this property from its parent element.

Code Explanation

All Tutorials related to CSS Properties

All Sections related to CSS