word-break : Word Break Property
The word-break property sets whether words can be broken at any character to fill a line. It is inherited, so it can be set on a container.
Usage
word-break: normal;
word-break: break-all;
Values
normal- The default. Lines break between words. A single word that is too long for a line is kept whole and overflows, unless overflow-wrap isbreak-wordoranywhere.break-all- Lines are filled completely, and a word is broken at any character where it reaches the end of the line. No hyphen is added, even ifhyphensis set.keep-all- Accepted, and the same asnormal.break-word- The older form ofoverflow-wrap: anywhere, so a word that is too long for a line is broken.
Examples
<div style="width: 80pt; word-break: break-all">
short supercalifragilisticexpialidocious end
</div>
The first line is filled with the start of the long word, rather than the word moving to a line of its own.
Notes
- For long codes and urls, use
overflow-wrap: break-wordto break only the words that are too long, orbreak-allto fill every line, for example in a narrow table cell of identifiers. - It has no effect with
white-space: nowraporpre. - The value can be set from data, for example
word-break: {{model.breaking}}. - Added in Paperwork.Core 9.8.