The word-break property specifies the line-breaking behavior within words.
p {
word-break: break-all;
}
| Property | Value | Explanation |
|---|---|---|
| word-break | normal | normal line-breaking (default) |
| break-all | allows line-breaking within words (for non-Asian text) | |
| keep-all | not allow line-breaking within words (for Asian text) |
<html> <head> <title>TAG index</title> <style type="text/css"> p { width: 40%; border: 1px #c0c0c0 solid; } #example1 { word-break: normal; } #example2 { word-break: break-all; } #example3 { word-break: keep-all; } </style> </head> <body> <p id="example1">normal<br>This is example text ...</p> <p id="example2">break-all<br>This is example text ...</p> <p id="example3">keep-all<br>This is example text ...</p> </body> </html>
normal
This is example text. The word-break property controls the line-breaking behavior within words.
break-all
This is example text. The word-break property controls the line-breaking behavior within words.
keep-all
This is example text. The word-break property controls the line-breaking behavior within words.
Screen shot in Japanese language