Question Details

Browse

Syntax highlighting in blog

By bjesse - Jan. 15, 2008

I am about to start using Wordpress or movable type for my blog. I write about tech stuff and include code snippets. I was hoping to highlight syntax in my posts, and ideally, link out to Wikipedia for other links. Any ideas on good ways to achieve this?


Answers

Add Answer
  1. By smalltransport on Jan. 16, 2008

    Hello bjesse, with regard to highlighting code snippets in WordPress the most effective method for doing so would be to wrap the snippet in the "" html tag and give it a unique font, color and background treatment via css.

    0 Votes
  2. By byrnereese on Mar. 04, 2008

    bjesse, wrapping HTML in the <code> tag will give you limited results and probably not produce the results you are looking for. I write about code a lot, and when I do, I use Yahoo's Syntax Highlighter. It is free, open source and totally awesome.


    I wrote an article about it in Movable Type's developer documentation a while ago. Check it out.


    0 Votes
Share your knowledge