Spacing Text

One of the problems with text in HTML is that no matter how many spaces you put between words, HTML only shows one space. There are ways you can force HTML to pay attention to your character spacing:

<PRE>

The first is the <PRE> tag.  Whenever you use this tag,
your text will appear space    for space and
	line
		for
			line
as it does in your code.  It's useful in some cases, but
usually preformatted text will be displayed with the 
Courier New font, which isn't that fun to read.  Not too
long ago Microsoft released a number of free new fonts for
the web, including Monotype.com, a monospace font that 
looks much nicer than Courier.

&nbsp;

There is another           way. Without forcing preformatted text, you can use the HTML tag '&nbsp;' (non-breaking space) to put space in between text. The advantage here is that line breaks can be fluid but the spaces between words can be preserved.

When I use &nbsp; to make a space, I usually alternate between spaces and the &nbsp; tag (rather than typing &nbsp; multiple times). I also try to keep the tag from ending up right next to a word (since that might make for problems for web indices to read the content of my pages).

One other note: another way to force space between words involves a tricky use of a transparent GIF. Visit the Images page for more information.


H O M E B A C K