Briefly
The word
property controls the wrapping of long words when they do not fit within the parent block.
Example
An example of how to set character wrapping using word
.
p { border: 1px solid #fff; width: 100px; word-wrap: break-word;}
p { border: 1px solid #fff; width: 100px; word-wrap: break-word; }
How to write
Possible values:
normal
— the default value. With this value, text will wrap at spaces, special characters, and the tag<br>
.break
— the word wraps at any letter upon reaching the edge of the parent area.- word
Tips
💡 By default, a long word without spaces between them will extend beyond the width of the container if it is not broken.