Word-wrap property
Last updated: 2026-09-13
word-wrap Word-wrap property
The word-wrap CSS property is an alias for overflow-wrap. It controls whether a long word or URL may break inside when it exceeds the container width. It was designed to prevent unbreakable long strings from overflowing the container and remains a common tool for text overflow; modern specs recommend overflow-wrap instead.
| Category | |
|---|---|
| Initial Value | normal |
| Inherited | Yes |
| Applies To | |
| Animation Type | |
| CSS Version | CSS3 |
| Status | Standard |
📝 Syntax
word-wrap: normal | break-word;
⚙️ Values
| Value | Type | Description |
|---|---|---|
normal | break-word | Keyword | Long-word wrapping (alias for overflow-wrap) |
▶ Example
Edit the code below and see the live result in the playground:
🌐 Browser Support
| Browser | |||||
|---|---|---|---|---|---|
| word-wrap | ✓ v10 | ✓ v12 | ✓ v1 | ✓ v1 | ✓ v10 |
| Supported in all major browsers | |||||
Tip: word-wrap: break-word prefers to break at word boundaries and only breaks inside a word when a single word exceeds the container width.
Important: word-wrap is the historical alias of overflow-wrap and the two are exactly equivalent. Modern projects should use overflow-wrap to match the spec.
❓ FAQ
QIs there any difference between word-wrap and overflow-wrap?
ANone — they are fully equivalent. word-wrap was the non-standard name implemented by early browsers; it was later standardized and renamed overflow-wrap, but word-wrap is kept as an alias for backwards compatibility.
QWhat is the difference between word-wrap: break-word and word-break: break-all?
Aword-wrap: break-word keeps words as whole as possible and only breaks them when necessary; word-break: break-all forces a break at the container edge regardless of word integrity.
QHow do I handle URLs or long words overflowing the container?
AUse word-wrap: break-word (i.e. overflow-wrap: break-word). The browser prefers to break at word boundaries and only breaks inside a word when a single long word cannot fit — ideal for URLs, emails, and hash strings.