CSS3 word-wrap Property
Example
Specify that wrapping should occur if long enough:
p.test {word-wrap:break-word;}
Try it »
Browser support
The numbers in the table indicate the first browser version that supports this property.
| property | |||||
|---|---|---|---|---|---|
| word-wrap | 4.0 | 5.5 | 3.5 | 3.1 | 10.5 |
Property definition and usage
The word-wrap property allows long content to wrap automatically.
| Default value: | normal |
|---|---|
| Inherited: | yes |
| Version: | CSS3 |
| JavaScript syntax: | object.style.wordWrap="break-word" |
Syntax
word-wrap: normal|break-word;
| Value | Description |
|---|---|
| normal | Wraps only at allowed break points (the browser keeps its default behavior). |
| break-word | Wraps inside long words or URL addresses. |
Related Articles
CSS3 tutorial: CSS3 Text Effects