Example
HTML
<!-- Learn about this code on MDN: https://developer.mozilla.org/en-US/docs/Web/CSS/hyphens -->
<ul>
<li><code>none</code>: no hyphen; overflow if needed
<p lang="en" class="none">An extreme­ly long English word</p>
</li>
<li><code>manual</code>: hyphen only at &hyphen; or &shy; (if needed)
<p lang="en" class="manual">An extreme­ly long English word</p>
</li>
<li><code>auto</code>: hyphen where the algorithm is deciding (if needed)
<p lang="en" class="auto">An extreme­ly long English word</p>
</li>
</ul>
CSS
p {
width: 55px;
border: 1px solid black;
}
p.none {
-webkit-hyphens: none;
-ms-hyphens: none;
hyphens: none;
}
p.manual {
-webkit-hyphens: manual;
-ms-hyphens: manual;
hyphens: manual;
}
p.auto {
/* These are technically the same, but use both */
overflow-wrap: break-word;
word-wrap: break-word;
-ms-word-break: break-all;
/* This is the dangerous one in WebKit, as it breaks things wherever */
word-break: break-all;
/* Instead use this non-standard one: */
word-break: break-word;
/* Adds a hyphen where the word breaks, if supported (No Blink) */
-ms-hyphens: auto;
-moz-hyphens: auto;
-webkit-hyphens: auto;
hyphens: auto;
}