Why do browsers do as a regular space?

Consider the following HTML snippet:

<p>Space&nbsp;Test</p>

When this HTML code is used on the web page and the page displayed by the browser, the character actually displayed by the browser between “Space” and “Test” is the usual space character (U + 0020), not non- (U + 00A0).

(This can be seen, for example, using the Firefox extension Character ID .)

I tried this on Firefox 5, Internet Explorer 8, and Chrome 12; they all had the same behavior when writing U + 0020 instead of U + 00A0 on the rendered web page, although although the original document contained &nbsp;, rather than the usual space character.

Why do browsers present a regular space character instead of a non-breaking space character in this way?

+5
source share
1 answer

This is a relic of the times before Unicode when the NBSP character does not exist in the standard character set. HTML defined the escape sequence &nbsp;as just a space that should not cause word wrap.

+4
source

All Articles