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:
<a href="http://theroadtothehorizon.blogspot.com">The Road to the Horizon</a> |
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