Thursday, March 12, 2009

How To Display Codes in Blogspot

For those who have tried displaying HTML codes into blog posts at one point or another, you must have been shocked to see your painstakingly typed codes turn into actual HTML objects (like input box or checkbox)!

There's many ways to do so, but here's a cheap and fast way of getting what you want (i.e. display codes just the way they are). Full credit goes to Dan Kogai for his wonderful site, which I'm sure will help many others out there!

Steps to take:
1) Go to http://www.dan.co.jp/cases/javascript/encode_entities.html and key in the code you wish to display at the "Source Text" area.
2) Copy all the text from the "With Entities Encoded" area.
3) Paste them in the "Compose" area when creating your blog post.

Update (March 16,2009): Check out my new post regarding another alternative to display codes in blogs.

No comments:

Post a Comment