CSS white-space Property Explained

What the CSS white-space property does, with an example.

Published November 5, 2026

The CSS white-space property controls how whitespace and line-wrapping is handled inside an element.

Key points

  • Check browser compatibility on a resource like caniuse.com if targeting older browsers

Example

white-space: nowrap;
More CSS articles