← Back to properties

CSS Property

height

Sizing

Sets the height of an element's content area.

Syntax

height: value;

Example

height: 100vh;

Common use cases

  • Full-viewport-height hero sections
  • Fixed-height cards in a grid
  • Scroll containers with overflow

Practical developer insight

height: 100% only works if the parent has an explicit height set — otherwise use min-height or viewport units instead.

Related properties