Word break
The word break class sets the word-break property. It controls how words or unbreakable strings break when reaching the end of a line.
| CSS Shortcut class | Applied style |
|---|---|
|
|
|
|
|
|
Examples
Normal
break-normal
These are long words: supercalifragilisticexpialidocious and Sutton-under‑Whitestonecliffe. This text breaks only at natural breakpoints, like spaces and hyphens. If there are no natural breakpoints, long words may overflow the container.
<p class="break-normal">
These are long words: supercalifragilisticexpialidocious and Sutton-under‑Whitestonecliffe. This text breaks only at natural breakpoints, like spaces and hyphens. If there are no natural breakpoints, long words may overflow the container.
</p>
Word
break-word
These are long words: supercalifragilisticexpialidocious and Sutton-under‑Whitestonecliffe. This text breaks long words when necessary to prevent overflow, by breaking anywhere within the word if no natural breakpoints (spaces and hyphens) exist.
<p class="break-word">
These are long words: supercalifragilisticexpialidocious and Sutton-under‑Whitestonecliffe. This text breaks long words when necessary to prevent overflow, by breaking anywhere within the word if no natural breakpoints (spaces and hyphens) exist.
</p>
All
break-all
These are long words: supercalifragilisticexpialidocious and Sutton-under‑Whitestonecliffe. This text breaks at any point, even in the middle of a word.
<p class="break-all">
These are long words: supercalifragilisticexpialidocious and Sutton-under‑Whitestonecliffe. This text breaks at any point, even in the middle of a word.
</p>
xs:> 480pxsm:> 640pxmd:> 768pxlg:> 1024pxxl:> 1280px
<div class="xs:break-word ...">
...
</div>