When is it appropriate to use non-breaking spaces?
The usage of a non-breaking space is explained in a Wikipedia article under Non-breaking spaces and Controlling line breaks and below in items 1 and 5:
- It is advisable to use a non-breaking space (also known as a hard space) to prevent the end-of-line displacement of elements that would be awkward at the beginning of a new line:
- in expressions in which figures and abbreviations (or symbols) are separated by a space (e.g.
17 kg
,AD 565
,2:50 pm
); - between the date number and month name (e.g.
3 June
orJune 3
); - in other places where breaking across lines might be disruptive to the reader, especially in infoboxes, such as
£11 billion
,June 2011
,5° 24′ 21.12″ N
,Boeing 747
, after the number in a numbered address (e.g.123 Fake Street
) and before Roman numerals at the end of phrases (e.g.World War II
andPope Benedict XVI
).
- A hard space can be produced with the HTML code
instead of the space bar;19 kg
yields a non-breaking19 kg
. - A literal hard space, such as one of the Unicode non-breaking space characters, should not be used since some web browsers will not load them properly when editing.
- Unlike normal spaces, multiple hard spaces are not compressed by browsers into a single space.
- A non-breaking space should be used before a spaced en dash.
One place where it's important is between a person's initials (e.g., J. Q. Adams), so that the J. and Q. don't end up separated. (A nonbreaking space isn't needed between the initials and the last name, though).