text-wrap

The shorthand property for 'text-wrap-mode' and 'text-wrap-style'. It provides a powerful way to control both if text wraps and how the wrapping algorithm behaves.

It is documented as part of the CSS Text specification.

/* Usage Example */
h1 {
  /* Short for nowrap and balanced styles */
  text-wrap: balance;
}

/* Syntax */
text-wrap: text-wrap-mode;
text-wrap: text-wrap-style;

/* Global values */
text-wrap: inherit;
text-wrap: initial;
text-wrap: revert;
text-wrap: revert-layer;
text-wrap: unset;
Newly available Since 2024 87% global usage

Since 2024 this feature works across the latest devices and browser versions. This feature might not work in older devices or browsers.

114+
121+
17.4+
114+
Kinsta

Your first month is free

Managed WordPress hosting for faster sites.

Learn more

New CSS drops.

Join 600+ readers who've survived clearfix hacks.

ESC