In summary
A text span
with a normal (breaking) space will be split to insert a line break.
A text span
with a non-breaking space will not be split. The line break will be moved earlier in the line.
In detail
is the HTML character entity for a non-breaking space.
span
without
In the paragraph below, we use CSS to highlight the text "100 billion".
Note the space character between 100
and billion
.
So far so good, everything looks fine.
100
and billion
. span
with To exclude this location as a line break opportunity, we can replace the space character with a non-breaking space.
100 billion
->
100 billion
? Yes, you can use the CSS property: white-space: nowrap;