CSS white-space Property Reference

The CSS white-space property is a standard property in CSS Text. Review its formal syntax, computed behavior, and practical declarations.

CSS white-space Property Reference

The CSS white-space property is a standard property in CSS Text. Review its formal syntax, computed behavior, and practical declarations.

Updated 2026-08-12

white-space overview

The CSS white-space property is a standard property in CSS Text. Review its formal syntax, computed behavior, and practical declarations.

The computed value normally inherits from the parent element when no declaration wins the cascade.

Syntax and formal definition

white-space formal syntax
FieldValue
Formal syntaxnormal | pre | pre-wrap | pre-line | <'white-space-collapse'> || <'text-wrap-mode'>
Initial valuenormal
Applies toallElements
InheritedYes
Percentagesno
Computed valueasSpecified
Animation typediscrete
Mediavisual
Specification groupCSS Text
StatusStandard

Practical examples

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

white-space live example
CSS .reset-example { white-space: initial; } .inherit-example { white-space: inherit; } @supports (white-space: initial) { .supported { white-space: initial; } }

Description

The CSS white-space property is a standard property in CSS Text. Review its formal syntax, computed behavior, and practical declarations.

References

  1. MDN: white-space
  2. MDN: CSS Properties Reference

Similar or alternative tools

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