For a complete list of How To's follow this link.
If you're looking for something else,
check out the LABELs drop down menu.

Friday, August 18, 2006

Non Breaking Space: Show in plain text

I'm not sure if any of you have been able to play with the code that I spoke about on Monday. Well, if you have, you may have noticed that when you type   preview your work and then return to look at the HTML, you will see a blank space where you typed  .

Yvonne from Faces of Yve kindly posted this comment and I wanted to share it with everyone as she explains how to 'show'   as plain text in your editing text:

[quote]Not sure if this will work or if Blogger will mess up the code, but in order to type an ampersand, you should type the ampersand, and then amp;

So to type out the full code for a non-breaking space, you can type

And it should show up without converting it to the non-breaking space.

The reason for this is that an ampersand has a special code-meaning, and in order to get it to show up as regular text, we need to signal to the browser that we want it to be text, and not to give it it's code-meaning. We do that by typing &. This is called "escaping" a character in programmer-speak.[/quote]

Thanks Yvonne!

Related Topic: nbsp;

1 comment:

Yvonne said...

You're welcome! And this goes for any place you need an ampersand or other special character. In addition to the   here's a bunch of frequently-used characters:

& - &
© - ©
™ - ™
< - &lt; (helpful for writing out code)
&rt; - &rt; (ditto)
« - &laquo;
» - &raquo;