Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.
Revision as of 00:08, 4 June 2026 by ADAMJR (talk | contribs) (Created page with "<includeonly><code class="nowrap" style="white-space:nowrap;">{{{1|{{{code|}}}}}}</code></includeonly><noinclude> {{DISPLAYTITLE:Template:Code}} Wraps a short snippet in inline <code>monospace</code> styling. Used for file names, extensions, values, and other literal text — e.g. {{code|.png}} or {{code|preview.jpg}}. == Usage == <pre>{{Code|your text here}}</pre> The first unnamed parameter is the text to format. You can also name it explicitly: <pre>{{Code|code=y...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


Wraps a short snippet in inline monospace styling. Used for file names, extensions, values, and other literal text — e.g. .png or preview.jpg.

Usage

{{Code|your text here}}

The first unnamed parameter is the text to format. You can also name it explicitly:

{{Code|code=your text here}}

Snippets containing "="

A snippet that contains an equals sign is mistaken for a named parameter. Number the parameter to fix this:

{{Code|1=width=100}}

Examples

Markup Result
{{Code|.png}} .png
{{Code|preview.jpg}} preview.jpg
{{Code|1=width=100}} width=100

Notes

This template uses only the built-in <code> HTML element, so it works on a stock MediaWiki install with no extra extensions. For multi-line or syntax-highlighted blocks, use the <syntaxhighlight> tag (requires the SyntaxHighlight extension) instead.