Wednesday, April 8, 2009

How to Display (Neatly) HTML/Javascript Source Code on Your Blog

Well, if you are a lazy bug and don't want to spend time on configuring your blogsphere, resort to HTML Encoder to save you the hard labor of encoding. The encoder can help you achieve that in a split second!

But, HTML Encoder is not the protagonist today. We want something advanced, don't we? I assume your answer is a definite YES. So today I'm going to introduce you SyntaxHighlighter, which makes posting code snippets online easier and also have all the codes look pretty and tidy. It's a big helper to developer/coder, if not to an amateurish blogger.

To use SyntaxHighlighter, however, you need to do some configuration first... I'm not going to spend my time further down the road, click HERE for a thorough usage tutorial.

2 comments:

  1. Thanks for this nice tip. I have always used 'Code' tag which don't retain formatting.

    ReplyDelete
  2. I am keeping track of different tips and tricks and want to display example HTML code in my blog posts, however, when I publish (or preview) Blogger turns my HTML code into real code instead of displaying it as-is (even when written) on the Compose page opposed to the edit html page.

    Please Help!

    ReplyDelete