May 06, 2021 CSS Reference Manual
The word-break property specifies how line breaks are handled.
Tip: By using the word-break property, you can let the browser implement line breaks anywhere.
Default: | normal |
---|---|
Inheritance: | yes |
Version: | CSS3 |
JavaScript syntax: | object .style.wordBreak="keep-all" |
word-break: normal|break-all|keep-all;
Value | Describe |
---|---|
normal | Use the browser's default line-by-line rule. |
break-all | Allows line-ups within words. |
keep-all | Line changes can only be made at half-corner spaces or hyphens. |
Property |
|
|
|
|
|
---|---|---|---|---|---|
word-break | 4.0 | 5.5 | 15.0 | 3.1 | 15.0 |
Word-break properties are supported in all major browsers.
Line break at the right word break point:
p.test {word-break:hyphenate;}