word break

Utilities for controlling word breaks in an element.

2025-04-09

Written by: tdtc

ClassStyles
break-normalword-break: normal;
break-allword-break: break-all;
break-keepword-break: keep-all;

Normal

Use the break-normal utility to only add line breaks at normal word break points:

<p class="break-normal">The longest word in any of the major...</p>

Break All

Use the break-all utility to add line breaks whenever necessary, without trying to preserve whole words:

<p class="break-all">The longest word in any of the major...</p>

Break Keep

Use the break-keep utility to prevent line breaks from being applied to Chinese/Japanese/Korean (CJK) text:

<p class="break-keep">抗衡不屈不挠...</p>

For non-CJK text the break-keep utility has the same behavior as the break-normal utility.

Ref