I have a <h1>
title with a long word, such as the following. The browser width depends on the device of course, but I've noticed that on one of my devices, it looks like this:
which is not a very nice word-breaking.
How to ask the browser to do "nicer" breakings instead?
Example: Internationali-sation or -tion or -on but not n
alone in the next line.
Here is how to reproduce the problem (I've hardcoded 260px
here just to reproduce what I've seen on my device, but this is not really hardcoded in my code):
.a { width: 260px; background-color: yellow; }
h1 { word-wrap: break-word; }
<div class="a">
<h1>Internationalisation</h1>
</div>