What does the   character mean?

The   character is called a no-break space and it's a character entity. There are two situations where you may need to use a no-break space:

1. Keep elements together

If you want to put space between two elements, but the browser should not break up these two parts in separate lines then replace the ordinary space with a no-break space.

For example, you want to write this These are the results :
You would want to keep the ":" attached to the line and not let the browser render it on a separate line when there's no free space on the line. Without a no-break space it could show up like this:

These are the results

Replace the space before the semicolon with   and the ":" will stick to the preceding word, so it will always look like this :

These are the results :

2. Create multiple spaces

The other use of this character is where you want to show multiple spaces in a text. Because normal spaces are collapsed to only one by the browser, no-break spaces are needed here:

These      spaces      will collapse,
but these &   are &   shown.
These spaces will collapse, but these    are    shown.

And this character can be used to create space between other elements then text, like images.

Back to the FAQ main page

  Copyright © 1996 - 1999 Rob Schlüter,   schluter@knoware.nl   (last updated 1999/03/01)