CSS word-break Property
CSS's word-break property can be used to specify when line breaks should occur. Line breaks are normally only used when there is a space or a hyphen. When the break-all value is set in the word-break property, the browser will break lines at any point.
Syntax
Property Values
| Value | Description |
|---|---|
| normal | The default value. The default line break rules are used. |
| break-all | To avoid overflow, the word can be broken at any character. |
| keep-all | For Chinese/Japanese/Korean (CJK) text, no word breaks should be used. The behavior of non-CJK text is the same as the value "normal." |
| break-word | To prevent overflow, the word can be broken at any point. |
| initial | This property is set to its default value. |
| inherit | This property is inherited from its parent element. |
Supported Browsers
| Property | Chrome | Firefox | Safari | Edge / IE | Opera |
|---|---|---|---|---|---|
| word-break | 4.0 | 15.0 | 3.1 | 5.5 | 15.0 |