Template:Code/doc

From PZwiki
Notebook.png
This is a documentation subpage for Template:Code.
It contains usage information and other content that is not part of the original template page.

The {{Code}} template, commonly just {{c}}, is used as a shorthand way of writing <nowiki><code>example</code></nowiki>, used to display code while also escaping wiki markup.

Usage

Basic usage.

Usage: {{Code|This is example text}}

Produces: This is example text


The code language can be defined for syntax highlight.

Usage: {{Code|<span style="color:red">Example</span>|lang=html}}

Produces: <span style="color:red;">Example</span>

See also