Tips & Tricks: Displaying Special Characters

You probably had instances where you need to display a piece of HTML code 'as is' on your blog, or where you need to use special characters like '<' or '>' etc..
Internet browsers easily get confused and often interpret these special characters as HTML code, resulting in goobledegoock displayed on the screen.

You might have discovered already that, to display special characters, you need to replace these with a code, prefix-ed with '&', called 'encoding'.
So if you want:

<a href="http://theroadtothehorizon.blogspot.com"> The Road to the Horizon</a>

to be displayed as is, on your page, it would have to be encoded like this:

&lt;a href=&quot;http://theroadtothehorizon.blogspot.com&quot;&gt;The Road to the Horizon&lt;/a&gt;

Check out this reference article listing all the special characters.

But, this becomes really cumbersome if you want to display whole lines of HTML code or a piece of text with a lot of these special codes in it. Here is a tool I use often to translate those coded passages with special characters.
Just cut and paste your text, as you want to have it displayed in the browser of your visitors (including all those special characters) onto the form in this page, and hit 'encode'. Copy and paste the resulting special code into your blog. Et voila! Finished!

Hope this helps.

Peter

More Blogging "Tips and Tricks", you find here.

0 comments:

Post a Comment

To avoid spamming and profanity, comments will only show up after I (manually) clear them.

Related Posts with Thumbnails
Kind people supporting The Road to the Horizon:
Find out how you can sponsor The Road

  © Blogger template The Business Templates by Ourblogtemplates.com 2008

Back to TOP