blob: 71f8c4cb9108bf5b967169319dea3b6a3fa08f6e [file] [log] [blame]
<!DOCTYPE html>
| Wrapping is only performed at an allowed break point, called a soft wrap
| opportunity. In most writing systems, in the absence of hyphenation a soft
| wrap opportunity occurs only at word boundaries. However, when the
| word-wrap property has a value of break-word, unbreakable "words" may be
| broken at an arbitrary point to prevent overflow, while still preserving
| grapheme clusters.
| On overflow, the first available break point will be selected. With word-wrap
| normal, this will be the first soft-wrap location. With word-wrap break-word,
| this will be at the first grapheme cluster boundary.
body {
margin: 0px;
font-family: Roboto;
font-size: 20px;
.containing-block {
background-color: #03a9f4;
width: 100px;
.word-wrap-break-word {
word-wrap: break-word;
.word-wrap-normal {
word-wrap: normal;
<div class="containing-block">
<div><span>a</span>bcdefghijkl<span class="word-wrap-break-word">op</span> qr<span>st</span></div>
<div><span>a</span>bcdefghijkl<span>op</span><span class="word-wrap-break-word">q r<span>s t</span></span></div>
<div><span>a</span>bcdefghijklmn<span>op</span>qr<span class="word-wrap-break-word">s t </span></div>