According to WikiPedia:
Syntax highlighting is a feature of some text editors that display text—especially source code—in different colors and fonts according to the category of terms. This feature eases writing in a structured language such as a programming language or a markup language as both structures and syntax errors are visually distinct. Highlighting does not affect the meaning of the text itself; it’s made only for human readers/editors.
SyntaxHighlighter 2.0 is one of the most popular fully functional self-contained code syntax highlighter developed in JavaScript. Alex Gorbatchev started this project in 2004 and since then has gained a lot of acceptance. Version 2.0 comes with a near complete rewrite, clean up, optimization, standard compliance and new features.
Features include:
- Easy to setup
- Over 20 syntax brushes available (PHP, SQL, JavaScript, HTML etc.)
- You can easily change the font size in the highlighted elements without having to mess around with additional CSS.
- Allows you to force highlighted elements on the page to be collapsed by default.
- Allows you to turn detection of links in the highlighted element on and off. If the option is turned off, URLs won’t be clickable.
- Allows you to turn line wrapping feature on and off.
- Source: http://alexgorbatchev.com/wiki/SyntaxHighlighter
- Demos: http://alexgorbatchev.com/wiki/SyntaxHighlighter:Brushes
- License: LGPL 3
GeSHI is a Generic Syntax Highlighter that aims to be a simple but powerful highlighting class. Initially, it was started as an idea to create a generic syntax highlighter for the phpBB forum system, but has been generalized to this project.
Features include:
- Support for a wide range of popular languages
- Easy to add a new language for highlighting
- Highly customisable output formats
GeSHi aims to do this all as quickly as possible. Many customisable features of GeSHi facilitate speed increases, and you can easily find a balance between the amount of highlighting done and the speed in which it is done.
- Source: http://qbnz.com/highlighter/
- Demo: http://qbnz.com/highlighter/demo.php
- Download: http://sourceforge.net/projects/geshi/files/
- License: GNU GPL





