Difference between word-break: break-all versus word-wrap: break-word
This example demonstrates the difference between word-break: break-all versus word-wrap: break-word
by Shreerang Patwardhan
HTML
<p>
Oooohhh.AslongaswegoteachotherWegottheworldspinninright inourhands.
</p>
<br />
<p class="break-all">
Oooohhh. As longaswegoteachother. Wegottheworldspinninright inourhands.
</p>
<br />
<p class="break-word">
Oooohhh. As longaswegoteachother. Wegottheworldspinninright inourhands.
</p>
CSS
p{
width: 200px;
border: solid 1px grey;
}
.break-word{
word-wrap: break-word;
}
.break-all{
word-break: break-all;
}