CodeCodex:Syntax Highlighting

From CodeCodex

Syntax Highlighting[edit]

To markup your code add a <pre> tag before your code and </pre> after. To render a specific language, change the opening tag to <pre class="java"> replacing 'java' with one of the available languages.

Syntax Highlighting is availabe on CodeCodex thanks to Syntax Highlighter.

Languages[edit]

C++ cpp, c, c++
C# c#, c-sharp, csharp
CSS css
Delphi delphi, pascal
Java java
Java Script js, jscript, javascript
Lua lua
PHP php
Python py, python
Ruby rb, ruby, rails, ror
Sql sql
VB vb, vb.net
XML/HTML xml, html, xhtml, xslt

Example[edit]

<pre class="java">
for (int i = 0 ; i <= 10 ; i++) { System.println.out(i); } //counting is fun!
</pre>

becomes

 for (int i = 0 ; i <= 10 ; i++) { System.println.out(i); } //counting is fun!