Help:Template cheatsheet
Appearance
This content is in the Help Namespace.
Character Substitution
| Template | Shortcut /
Alternative |
HTML Entity Code | Usage | Example | Rendered | Description | |
|---|---|---|---|---|---|---|---|
| Decimal | Named | ||||||
| {{=}} | {{eq}} | = |
|
no parameters | {{eq}}
|
= | Escapes "=". Allows "=" to be used in unnamed template parameters. |
| {{!}} | na | | | no parameters | {{!}}
|
| | Escapes "|". Used to encode "|" within template parameters or wikitables. | |
| {{'}} | {{apostrophe}} | ' | ' | no parameters | The ''Iliad''{{'}}s vocabulary is archaic.
|
The Iliad's vocabulary is archaic. | Used to encode apostrophe to keep it separate from ('') wiki markup.
|
| {{`}} | na | ` |
no parameters | ... that '''[[Wikipedia:Bhutan|Bhutan]]'''{{`}}s capital is [[Wikipedia:Thimphu|Thimphu]]?
|
... that Bhutan's capital is Thimphu? | Used to encode apostrophe to keep it separate from (''') wiki markup.
| |
| {{′}} | {{prime}} | ′ | ′ | {{′|text}} or text{{′}}s
|
''{{′|f}}''(''{{′|x}}'') ≥ 0
|
f′(x′) ≥ 0 | Used to encode prime symbol with leading space so it does not collide with a preceding italic character |
| {{braces}} | {{braces|code=on/off |Templatename|item1|item2}}
|
{{braces|Templatename}}
|
{{Templatename}} | ||||
| {{bracket}} | {{bracket|text}}
|
{{bracket|test}}
|
[test] | ||||
| {{brackets}} | {{brackets|text}} or {{brackets|text|more}}
|
{{brackets|test}}
|
[[test]] | ||||
| {{sp}} |   | | no parameters | green{{sp}}and blue
|
green and blue | ||
| {{colon}} | : | : | no parameters | {{colon}}
|
: | ||
| {{!!}} | || | {{!!}}
|
|| | ||||
| {{!(}} | [ | {{!(}}
|
[ | ||||
| {{)!}} | ] | {{)!}}
|
] | ||||
| {{!((}} | [[ | {{!((}}
|
[[ | ||||
| {{))!}} | ]] | {{))!}}
|
]] | ||||
| {{(}} | { | {{(}}
|
{ | ||||
| {{)}} | } | {{)}}
|
} | ||||
| {{((}} | {{ | {{((}}
|
{{ | ||||
| {{))}} | }} | {{))}}
|
}} | ||||
| {{(((}} | {{{ | {{(((}}
|
{{{ | ||||
| {{)))}} | }}} | {{)))}}
|
}}} | ||||
Code Markup
| Template | Shortcut /
Alternative |
Usage | Example | Rendered | Description |
|---|---|---|---|---|---|
| {{key press}} | {{key press| 1st key | 2nd Key | 3rd Key | chain= }}
|
{{key press|Ctrl|Alt|Del}}
|
Ctrl+Alt+Del | Illustrates keys and keystrokes on a computer keyboard. | |
| {{code}} | |||||
| {{pre}} | |||||
| {{pre2}} | |||||
| {{tag}} | |||||
| {{syntaxhighlight}} |
Symbols
| Template | Shortcut /
Alternative |
Usage | Example | Rendered | Description |
|---|---|---|---|---|---|
| {{key press}} | {{key press| 1st key | 2nd Key | 3rd Key | chain= }}
|
{{key press|Alt|0}}{{key press|1|7|7|chain=}}
|
Alt+0177 | Illustrates keys and keystrokes on a computer keyboard. | |
| {{unichar}} | |{{unichar|a9|COPYRIGHT SIGN}} for intellectual property</code>
|
U+00A9 © COPYRIGHT SIGN for intellectual property | |||
| {{radic}} | {{radic| root | power }}
|
{{radic|1 + 2''x''|4}}
|
4√1 + 2x | ||
| {{frac}} | {{frac| integer | numerator | denominator }}
|
{{frac|1|2|3}}
|
12⁄3 | ||
| {{sfrac}} | {{sfrac| integer | numerator | denominator }}
|
{{sfrac|1|2|3}}
|
123 | ||
| {{pars}} | {{pars| s=size | text }}
|
{{pars|s=200%|Content-inside-parentheses}}
|
(Content-inside-parentheses) | ||
| {{vec}} | {{vec|''A''| left/right | under/over }}
|
{{vec|''A''|left|under}}
|
A← | ||
| {{dot}} | no parameters | {{dot}}
|
· | ||
| {{Spaced en dash}} | {{dash}} | no parameters | {{dash}}
|
– | |
| {{em dash}} | {{emdash}} | no parameters | {{emdash}}
|
— |
Quotes
| Template | Shortcut /
Alternative |
Usage | Example | Rendered | Description |
|---|---|---|---|---|---|
| {{poem}} |
|
|
|||
| {{quote}} | {{blockquote}} |
|
|
||
| {{quote box}} |
|
|
|||
| {{quote frame}} |
|
|
|||
| {{tweet}} |
|
|
TOC
| Template | Shortcut /
Alternative |
Usage | Example | Rendered | Description |
|---|---|---|---|---|---|
| {{TOC left}} |
|
|
|||
| {{TOC right}} |
|
|
|||
| {{TOC center}} |
|
|
|||
| {{TOC limit}} |
|
|
|||
| {{TOC hidden}} |
|
|
|||
| {{Headless TOC}} | {{Template:Headless TOC}} |
|
|
||
| {{Horizontal TOC}} | {{Template:Horizontal TOC}} |
|
|
Layout
| Template | Shortcut /
Alternative |
Usage | Example | Rendered | Description |
|---|---|---|---|---|---|
| {{right}} | {{right|text}}
|
{{right|floating right}}
|
floating right | ||
| {{left}} | {{left|text}}
|
{{left|floating left}}
|
floating left
|
||
| {{center}} | {{center|text}}
|
{{center|floating center}}
|
floating center
|
||
| {{center block}} | {{center block| width= | height= | text}}
|
see template documentation | not helpful to render here | ||
| {{float}} |
|
|
|||
| {{float left}} |
|
|
|||
| {{float right}} |
|
|
|||
| {{float center}} |
|
|
|||
| {{clear}} |
|
|
|||
| {{align}} |
|
|
|||
| {{stack}} |
|
|
|||
| {{indent}} |
|
|
|||
| {{outdent}} | {{out}} {{od}} |
|
|
||
| {{raise}} |
|
|
|||
| {{lower}} | {{out}} {{od}} |
|
|
Inline Spacing
| Template | Shortcut /
Alternative |
HTML Entity Code | →Size←
|
Usage | Example | Rendered | Description | |
|---|---|---|---|---|---|---|---|---|
| Decimal | Named | |||||||
| Non-Breaking Space characters | ||||||||
| {{zero width joiner}} | {{zwj}} | ‍ | ‍ | →←
|
no parameters | ''A zero width joiner''{{zero width joiner}}{{fake citation needed}}
|
A zero width joiner[citation needed] | Invisibly 'sews together' two words as if they were a single word |
| {{hair space}} | {{hsp}} {{hairsp}} {{px1}} |   |   | → ←
|
no parameters | ''A hair space''{{hsp}}{{fake citation needed}}
|
A hair space [citation needed] | 1 pixel width non-breaking space |
| {{narrow no-break space}} | {{nnbsp}} {{Template:Narrow no-break space}} {{Template:Narrow no-break space}} |   | → ←
|
{{nnbsp|symbol}}
|
wedding cost US${{nnbsp}}2,000,000.
|
wedding cost US$ 2,000,000. | Narrow non-breaking space | |
| {{thin space}} | {{tsp}} |   |   | → ←
|
{{thin space|symbol}}
|
({{thin space|symbol}}) instead of: (symbol)
|
( symbol ) instead of: (symbol) | A thin non-breaking space 1/5 of an em |
| {{spaces}} | {{space}} {{nbsp}} | varies | → ←
|
{{spaces|number off|type}}
|
text{{spaces|2|em}}text
|
text text | Used to display one or more non-breaking spaces of specified type | |
| {{figure space}} | {{fs}} {{fsp}} |   |   | → ←
|
{{Figure space|number off}}
|
123{{br}}1{{fsp}}3
|
1231 3 | A non-breaking space equal in width to a digit |
| {{ns}} |   | | → ←
|
{{ns|number off}}
|
Ten{{ns|10}}eight{{ns|8}}six{{ns|6}}four{{ns|4}}!
|
Ten eight six four ! | Without any parameters inserts 3 non-breaking spaces | |
| {{quad}} |   | | → ←
|
no parameters | text{{quad}}text
|
text text | Inserts 4 non-breaking spaces | |
| {{nb5}} |   | | → ←
|
{{nb5|number of spaces}}
|
text{{nb5}}text
|
text text | Inserts 5 non-breaking spaces | |
| {{nb10}} |   | | → ←
|
no parameters | text{{nb10}}text
|
text text | Inserts 10 non-breaking spaces | |
| Breaking Space characters | ||||||||
| {{zero width space}} | {{zwsp}} {{Template:Zero width space}} | ​ | ​ | →←
|
no parameters | ribulosebisphosphate{{0ws}}carboxylaseoxygenase
|
ribulosebisphosphatecarboxylaseoxygenase | Used to indicate where very large words will break if necessary |
| {{sp}} |   | na | → ←
|
|
I like green{{#if:{{{blue|}}}|{{sp}}and blue|{{sp}}but not blue}}
|
I like green but not blue | Most common space entity, typically used in passing template parameters | |
| Non-characters spaces | ||||||||
| {{px2}} | na | →←
|
no parameters | ''Two pixel gap''{{px2}}{{fake citation needed}}
|
Two pixel gap[citation needed] | Adds 2px of horizontal space | ||
| {{gaps}} | na | →←
|
{{gaps|lhs=prefix|num|num|num|u=suffix}}
|
{{gaps|lhs=π|3.14159|26535|89793|...}}{{gaps|299|792|458|u=m/s}}
|
π = 3.141592653589793...299792458 m/s | Outputs its unnamed arguments in order with gaps of 0.25em between | ||
| {{pad}} | na | → ←
|
|
|
||||
| {{in5}} | na | → ←
|
|
|
||||
| {{vpad}} | na | {{vpad |1= |clear= }}
|
__{{br}}{{vpad|1=1em|clear=left}}__
|
____ | Creates an invisible div of user-specified height for padding. | |||
| {{indent}} | na |
|
|
|||||
| {{outdent}} | {{out}} {{od}} | na |
|
|
||||
| Name / size | →Instance← |
Example code and ... | Using {{spaces}} | Output | Output {{spaces}} |
|---|---|---|---|---|---|
| none | →← |
Some text<ref>...</ref>
|
Some text[1] | ||
| Hair | → ←
|
Some text{{hair space}}<ref>...</ref>
|
Some text{{spaces|hair}}<ref>...</ref>
|
Some text [1] | Some text [1] |
| 2-pixel | →←
|
Some text{{px2}}<ref>...</ref>
|
Some text[1] | ||
| Narrow no-break | → ←
|
Some text{{narrow no-break space}}<ref>...</ref>
|
Some text [1] | ||
| Thin | → ←
|
Some text{{thin space}}<ref>...</ref>
|
Some text{{spaces|thin}}<ref>...</ref>
|
Some text [1] | Some text [1] |
| Standarda | → ←
|
Some text <ref>...</ref>
|
Some text{{spaces}}<ref>...</ref>
|
Some text [1] | Some text [1] |
| En | → ←
|
1 3
|
1{{spaces|en}}3
|
1 3 | 1 3 |
| Figure | → ←
|
123<br/>1{{figure space}}3
|
123{{br}}1{{spaces|fig}}3
|
123 1 3 |
1231 3 |
| Em | → ←
|
1 3
|
1{{spaces|em}}3
|
1 3 | 1 3 |
a Provided here by a non-breaking space ( ).
Text Size
| Template | Shortcut /
Alternative |
Usage | Example | Rendered | Description |
|---|---|---|---|---|---|
| {{small}} |
|
|
|||
| {{smaller}} |
|
|
|||
| {{resize}} |
|
|
|||
| {{midsize}} |
|
|
|||
| {{larger}} |
|
|
|||
| {{big}} |
|
|
|||
| {{large}} |
|
|
|||
| {{huge}} |
|
|
|||
| {{font}} |
|
|
Text Formatting
| Template | Shortcut /
Alternative |
Usage | Example | Rendered | Description |
|---|---|---|---|---|---|
| {{highlight}} | {{h}} | {{H|text|colour|expiry}}
|
some text with a {{H| highlighted | #00FF00 | 1 January 2099}} portion
|
some text with a highlighted portion | Colour and date are optional Parameters, if a date is added the text will not be highlighted after the date has passed |
| {{hover title}} | {{Hover title|text|hover text|link=yes/no|dotted=yes/no}}
|
{{Hover title|Hello|example}}
|
example | ||
| {{color}} | |||||
| {{font color}} | |||||
| {{font}} | |||||
| {{em}} | |||||
| {{strong}} | |||||
| {{nowrap}} | |||||
| {{pad}} |
superscript and subscript
| Template | Shortcut /
Alternative |
Usage | Example | Rendered | Description |
|---|---|---|---|---|---|
| {{sup}} | text{{sup|superscript}}
|
text{{sup|superscript}} {{sup|superscript}}text
|
textsuperscript superscripttext | ||
| {{smallsup}} | {{ssup}} | text{{smallsup|small superscript}}
|
text{{smallsup|small superscript}} {{smallsup|small superscript}}text
|
textsmall superscript small superscripttext | |
| {{i sup}} | {{issup}} {{padlssup}} | ''text''{{i smallsup|small superscript}}
|
''text''{{i smallsup|small superscript}} (rather than: ''text''{{sup|superscript}})
|
textsmall superscript (rather than: textsmall superscript) | |
| {{i smallsup}} | {{issup}} {{padlssup}} | ''text''{{i smallsup|small superscript}}
|
''text''{{i smallsup|small superscript}} (rather than: ''text''{{smallsup|small superscript}})
|
textsmall superscript (rather than: textsmall superscript) | |
| {{b sup}} | {{bsup}} | text{{b sup|superscript}}
|
text{{b sup|superscript}} (rather than: text{{sup|superscript}})
|
textsuperscript (rather than: textsuperscript) | |
| {{sub}} | text{{sub|subscript}}
|
text{{sub|subscript}} {{sub|subscript}}text
|
textsubscript subscripttext | ||
| {{smallsub}} | {{ssub}} | text{{smallsub|small subscript}}
|
text{{smallsub|small subscript}} {{smallsub|small subscript}}text
|
textsmall subscript small subscripttext | |
| {{subsub}} | text{{subsub|double-subscripted}}
|
text{{subsub|double-subscripted}} {{subsub|double-subscripted}}text
|
textdouble-subscripted double-subscriptedtext | ||
| {{su}} | text{{su|p=superscript|b=subscript}}
|
text{{su|p=p{{eq}}superscript|b=b{{eq}}subscript}} {{su|p=p{{eq}}superscript|b=b{{eq}}subscript}}text
|
textp=;superscript b=subscript p=superscript b=subscripttext |
||
| {{sup sub}} | text{{sup sub|sup|sub}}{{spaces|4}}{{sup sub|sup|sub}}text
|
textsup sub sup subtext |
|||
| {{±}} | 1.23{{±|superscript|subscript}}
|
1.23{{±|4|2}}
|
1.23+4 −2 |
||
| {{overunderset}} | {{underoverset}} | {{overunderset|text|superscript|subscript}}
|
{{overunderset|text|superscript|subscript}}
|
||
| {{raise}} |
|
|
|||
| {{lower}} | {{out}} {{od}} |
|
|
Lists
| Template | Shortcut /
Alternative |
Usage | Example | Rendered | Description |
|---|---|---|---|---|---|
| {{hlist}} | |||||
| {{plainlist}} | |||||
| {{cslist}} | |||||
| {{flatlist}} | |||||
| {{bulleted list}} | |||||
| {{ordered list}} | |||||
| {{unbulleted list}} | |||||
| {{glossary}} | |||||
| {{term}} | |||||
| {{flowlist}} | |||||
| {{columns-list}} | |||||
| {{mset}} |
Links
| Template | Shortcut /
Alternative |
Usage | Example | Rendered | Description |
|---|---|---|---|---|---|
| {{URL}} | |||||
| {{URL2}} | |||||
| {{plain link}} | {{scp}} {{plk}} | ||||
| {{plain}} | {{pln}} {{pla}} | ||||
| {{oldid}} | {{permalink}} | ||||
| {{oldid2}} | |||||
| {{diff}} | |||||
| {{history}} | {{ph}} | ||||
| {{pagelinks}} | |||||
| {{page-multi}} | |||||
| {{section link}} | {{slink}} {{Template:Section link}} | ||||
| {{multi-section link}} | {{mslink}} |
Tables
| Template | Shortcut /
Alternative |
Usage | Example | Expands to | Description |
|---|---|---|---|---|---|
| {{right}} | {{right}}
|
| {{Right}} text
|
| style="text-align:right"| text
|
||
| {{left}} | {{left}}
|
| {{left}} text
|
| style="text-align:left"| text
|
||
| {{center}} | {{center}}
|
| {{center}} text
|
| style="text-align:center"| text
|
||
| {{float right}} | {{float right}}
|
{| class="wikitable" style="{{float right}}"
|
{| class="wikitable" style="float: right; margin-left: 1em; clear: right;"
|
||
| {{float left}} | {{float left}}
|
{| class="wikitable" style="{{float left}}"
|
{| class="wikitable" style="float: left; margin-right: 1em;"
|
||
| {{float center}} | {{float center}}
|
{| class="wikitable" style="{{float center}}"
|
{| class="wikitable" style="margin-left: auto; margin-right: auto;"
|
||
| {{Vertical Text}} | |{{Vertical Text|long text}}
|
{{Vertical Text|long text}}
|
<span style="writing-mode: vertical-lr; white-space: nowrap; min-width: 20px; transform: rotate(180deg); ">long text</span>
|
Language
| Template | Shortcut /
Alternative |
Usage | Example | Rendered | Description |
|---|---|---|---|---|---|
| {{Lang-en}} |
|
|
|||
| {{Lang-fr}} |
|
|
|||
| {{Lang-it}} |
|
|
|||
| {{Lang-de}} |
|
|
|||
| {{Lang-es}} |
|
|
|||
| {{Lang-pt}} |
|
|
|||
| {{lang-nl}} |
|
|
|||
| {{lang-da}} |
|
|
|||
| {{lang-ru}} |
|
|
|||
| {{lang-fi}} |
|
|
|||
| {{lang-no}} |
|
|
|||
| {{lang-sv}} |
|
|
|||
| {{lang-zh}} |
|
|
|||
| {{lang-ko}} |
|
|
|||
| {{lang-ja}} |
|
|
Logic
| Template | Shortcut /
Alternative |
Usage | Example | Rendered | Description |
|---|---|---|---|---|---|
| {{if}} | |||||
| {{ifor}} | |||||
| {{ifeq}} | |||||
| {{ifeqall}} | |||||
| {{ifeqany}} | |||||
| {{for loop}} | |||||
| {{yesno}} | |||||
| {{ifnotempty}} |
HTML tag alternatives
| Template | Shortcut /
Alternative |
HTML Tag | Usage | Example | Rendered | Description |
|---|---|---|---|---|---|---|
| {{pre}} | <pre>...</pre>
|
|||||
| {{pre2}} | <pre>...</pre>
|
|||||
| {{code}} | <code>...</code>
|
|||||
| {{kbd}} | <kbd>...</kbd>
|
|||||
| {{samp}} | <samp>...</samp>
|
|||||
| {{hr}} | <hr />
|
|||||
| {{break}} | <br />
|
|||||
| {{clear}} | {{br}} | <div style="clear: both;"></div>
|
||||
| {{abbr}} | <abbr>...</abbr>
|
|||||
| {{quote}} | <blockquote>...</blockquote>
|
|||||
| {{citation}} | {{cite}} | <cite>...</cite>
|
||||
| {{strikethrough}} | {{strike}} | <del>...</del>
|
||||
| {{underline}} | {{under}} | <u>...</u>
|
||||
| {{strong}} | <strong>...</strong>
|
|||||
| {{em}} | <em>...</em>
|
|||||
| {{dfn}} | <dfn>...</dfn>
|
|||||
| {{highlight}} | {{h}} | <mark>...</mark>
|
||||
| {{font}} | <font>...</font>
|
|||||
| {{center}} | <center>...</center>
|
|||||
| {{var}} | <var>...</var>
|
|||||
| {{sub}} | <sub>...</sub>
|
|||||
| {{sup}} | <sup>...</sup>
|