CSS word-break Property
Example
Break words at any character:
p.a {
word-break: break-all;
}
Try it Yourself »
Definition and Usage
The word-break property specifies how words
should break when reaching the end of a line.
| Default value: |
normal |
| Inherited: |
yes |
| Animatable: |
no. Read about animatable |
| Version: |
CSS3 |
| JavaScript syntax: |
object.style.wordBreak="break-all"
Try it
|
Browser Support
The numbers in the table specify the first browser version that fully supports the property.
| Property |
|
|
|
|
|
| word-break |
4.0 |
5.5 |
15.0 |
3.1 |
15.0 |
CSS Syntax
word-break: normal|break-all|keep-all|initial|inherit;
Property Values
| Value |
Description |
| normal |
Default value. Uses default line break rules |
| break-all |
To prevent overflow, word may be broken at any character |
| keep-all |
Word breaks should not be used for Chinese/Japanese/Korean (CJK) text.
Non-CJK text behavior is the same as value "normal" |
| break-word |
To prevent overflow, word may be broken at arbitrary points |
| initial |
Sets this property to its default value. Read about initial |
| inherit |
Inherits this property from its parent element. Read about inherit |