O'Reilly logo

CSS Pocket Reference, 4th Edition by Eric A. Meyer

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

word-wrap

Values:

normal | break-word

Initial value:

normal

Applies to:

All elements

Inherited:

Yes

Computed value:

Same as declared value

Description:

Defines how text should be wrapped in situations where it would not ordinarily be wrapped; for example, a very long string of numbers containing no spaces, such as the first thousand digits of pi. The value break-word permits user agents to break a word at arbitrary points if it cannot find regular breakpoints within the “word” (text string).

Examples:

td {word-wrap: break-word;}
p {word-wrap: normal;}

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required