Code syntax highlighting examples

On this website, we can enter code snippets directly on the page have the code highlighted and laid out accoriding to how you enter it. We use the Generic Syntax Highlighter (GeSHi) package:http://qbnz.com/highlighter/index.php, a common, open source package.

More information on the Wikimedia extension at http://www.mediawiki.org/wiki/Extension:SyntaxHighlight_GeSHi

To markup your code, simply including your code in angle brackets with the term source, and the language being used with the term lang. Below are some examples.