Here is a pen by Chris Coyier, referred in his article Handling Long Words and URLs: https://codepen.io/team/css-tricks/pen/RWaNxr.
<style>
.hyphenate {
/* Careful, this breaks the word wherever it is without a hyphen */
overflow-wrap: break-word;
word-wrap: break-word;
/* Adds a hyphen where the word breaks */
-webkit-hyphens: auto;
-ms-hyphens: auto;
-moz-hyphens: auto;
hyphens: auto;
}
/* Demo Styles */
body {
background: #333;
font-family: 'Open Sans', sans-serif;
}
.container {
background: #fff;
border-radius: 5px;
width: 300px;
margin: auto auto 25px;
padding: 25px;
}
</style>
<div class="container">
<p class="hyphenate">For more information, please visit: http://csstricks.com/thisisanonexistentandreallylongurltoaddtoanytextinfactwhyareyoustillreadingit.</p>
</div>
<div class="container">
<p class="hyphenate">According to Wikipedia, The longest word in any of the major English language dictionary is pneumonoultramicroscopicsilicovolcanoconiosis, a word that refers to a lung disease contracted from the inhalation of very fine silica particles, specifically from a volcano; medically, it is the same as silicosis.</p>
</div>
Here is how it looks in Firefox if you simply open this link in the browser:
And here is how it looks if you copy everything to a local HTML file:
Why it looks different?