emailconfirmed, nsInternRO, nsInternRW, Administrators
3,356
edits
Line 212: | Line 212: | ||
Some [[wikipedia:HTML|HTML]] tags are allowed in MediaWiki, for example <tt><nowiki><div></nowiki></tt>, <tt><nowiki><span></nowiki></tt> and <tt><nowiki><font></nowiki></tt>. | Some [[wikipedia:HTML|HTML]] tags are allowed in MediaWiki, for example <tt><nowiki><div></nowiki></tt>, <tt><nowiki><span></nowiki></tt> and <tt><nowiki><font></nowiki></tt>. | ||
If you want to use <tt><nowiki><code></nowiki></tt>, you should use <tt><source></tt> instead! It supports Syntax Coloring. You can also specify a language, eg. <tt><source lang="c" line start="55" highlight="4" enclose="div"></tt> : | If you want to use <tt><nowiki><code></nowiki></tt>, you should definitely use <tt><source></tt> instead! It supports Syntax Coloring. You can also specify a language, eg. <tt><source lang="c" line start="55" highlight="4" enclose="div"></tt> : | ||
<source lang="c" line start="55" highlight="4 | <source lang="c" line start="55" highlight="4"> | ||
// Global variable | // Global variable | ||
int x = 7; | int x = 7; | ||
Line 224: | Line 224: | ||
} | } | ||
</source> | </source> | ||
Please see the [http://www.mediawiki.org/wiki/Extension:SyntaxHighlight_GeSHi MediaWiki GeSHi Page] for detailed information to use some of the parameters: | Please see the [http://www.mediawiki.org/wiki/Extension:SyntaxHighlight_GeSHi MediaWiki GeSHi Page] for detailed information to use some of the parameters: | ||
* lang="xyz": ''defines the language'', eg. "c", "php", ... | * lang="xyz": ''defines the language'', eg. "c", "php", ... | ||
* line: ''show line numbering'' | * line: ''show line numbering'' |