When I started my code snippet into my blog, I used <pre></pre> to make it as pre-formated text. However, it is ugly without syntax highlight.
There are many WordPress plugins that can add the syntax highlight to various languages (just to go Plugins-> Add New-> Search for Syntax Highlight, you will find plenty). The one that I picked is called “Prettify GC Syntax Highlighter”. It uses the Google Code style highlight and has various control. Check the developer’s website for more information.
You can check out my previous post for a quick example.
It support a long list of languages.
What is your favorite syntax highlighter? Let us know.
How To Add Syntax Highlight for Code in WordPress