CSS height Property Reference

The CSS height property is a standard property in CSS Box Sizing. Review its formal syntax, computed behavior, and practical declarations.

CSS height Property Reference

The CSS height property is a standard property in CSS Box Sizing. Review its formal syntax, computed behavior, and practical declarations.

Updated 2026-08-12

height overview

The CSS height property is a standard property in CSS Box Sizing. Review its formal syntax, computed behavior, and practical declarations.

The property is not inherited by default. Use an explicit global keyword when inheritance is intended.

Syntax and formal definition

height formal syntax
FieldValue
Formal syntaxauto | <length-percentage [0,∞]> | min-content | max-content | fit-content | fit-content(<length-percentage [0,∞]>) | <calc-size()> | <anchor-size()>
Initial valueauto
Applies toallElementsButNonReplacedAndTableColumns
InheritedNo
PercentagesregardingHeightOfGeneratedBoxContainingBlockPercentagesRelativeToContainingBlock
Computed valuepercentageAutoOrAbsoluteLength
Animation typelpc
Mediavisual
Specification groupCSS Box Sizing
StatusStandard

Practical examples

These declarations demonstrate valid ways to set height. The initial and inherit global keywords remain available even when a property-specific value is preferable.

height live example
CSS .reset-example { height: initial; } .inherit-example { height: inherit; } @supports (height: 12rem) { .supported { height: 12rem; } }

Description

The CSS height property is a standard property in CSS Box Sizing. Review its formal syntax, computed behavior, and practical declarations.

References

  1. MDN: height
  2. MDN: CSS Properties Reference

Similar or alternative tools

Don't forget to set a bookmark for tool.io!
Privacy | Imprint | Cookies