Blogger Tip Tricks No 6. : Posting Source Code in Blog
>> Wednesday, November 4, 2009
Sometimes we want to write HTML or javascript code (source code) in our posts, but if we "just" write the code as it, then "these codes" will be executed...
Example, if we want to write
This code below is intended to make the word "Blogger Tip Trick No.4.: Removed The Blogger NavBar" link into http://doit2us.blogspot.com/2009/11/blogger-tips-trick-no-4.
<a href="http://doit2us.blogspot.com/2009/11/blogger-tips-trick-no-4.html">Blogger Tip Trick No.4.: Removed The Blogger NavBar</a>But if you write exactly as same as the code above than you will get executed code :
Blogger Tip Trick No.4.: Removed The Blogger NavBar
So.. you must write...
<a href="http://doit2us.blogspot.com/2009/11/blogger-tips-trick-no-4.html">Blogger Tip Trick No.4.: Removed The Blogger NavBar</a>Yup.. to posting source code in a blog posts, we have to replace the certain character with a notation first,
for example,
character < must be replace with notation <the list of notation / certain characters can be see on the ..
character > must be replace with notation >
character &must be replace with notation &
character " must be replace with notation "
character ± must be replace with notation ±
character space must be replace with notation
character © must be replace with notation ©
character ® must be replace with notation ®
But even if we have thecomplete list of these character, to write the source code was not an easy job at all..
Fortunately Elliot Swan create a site where we can convert the source code of HTML and javascript that will we write in a blog post. Elliot made a tool that he put it in his site "Making your code friendly".
So anytime if we want to posting some HTML and/or Javascript code in to our blog posts, just:
- Visit http://www.elliotswan.com/postable/
- Copy-paste your html and javascript code into the box, and click the postable button "Make It Friendly ".
- Then copy and paste the generated code into your post... As simple as that..
1 comments:
Or you could just use the Updated Blogger New Post Editor. Blogger will automatically convert the character to notation.
Post a Comment