Help:Editing
From ProgrammingExamples
Quick tricks
- To get syntax highlighting, surround your source code with
<source lang="language">...</source>
or (preferred)<syntaxhighlight lang="language">...</syntaxhighlight>
.
The list of supported languages is huge, and includes among many others c, cpp, java, perl, python. Note: lang attributes are in all lower case. - To keep your indentation, but not show syntax highlighting, you may surround your code with pre tags:
<pre>your code</pre>