Jump to content

Help:Template cheatsheet

From pool
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}} 41 + 2x
{{frac}} {{frac| integer | numerator | denominator }} {{frac|1|2|3}} 1+23
{{sfrac}} {{sfrac| integer | numerator | denominator }} {{sfrac|1|2|3}} 1 2/3
{{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}}

Inline Spacing

Template Shortcut /

Alternative

Instance Usage Example Rendered Description
{{spaces}} {{space}} {{nbsp}}   {{spaces|number off|type}} text{{spaces|2|em}}text text  text
{{thin space}}
{{figure space}} {{fs}} {{fsp}}
{{hair space}} {{hsp}} {{hairsp}} {{px1}}
{{narrow no-break space}} {{nnbsp}} {{Template:Narrow no-break space}} {{Template:Narrow no-break space}}
{{nb5}}      
{{nb10}}           
{{ns}}    
{{quad}}     
{{zero width joiner}} {{zwj}}
{{sp}}
{{zero width space}} {{zwsp}} {{Template:Zero width space}}
{{gaps}}
{{in5}}      
{{px2}} {{space}} {{px2}}}}
{{pad}}  
{{vpad}}
{{indent}}
{{outdent}} {{out}} {{od}}


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&nbsp;<ref>...</ref> Some text{{spaces}}<ref>...</ref> Some text [1] Some text [1]
En 1&ensp;3 1{{spaces|en}}3 1 3 13
Figure 123<br/>1{{figure space}}3 123{{br}}1{{spaces|fig}}3 123
13
123
13
Em 1&emsp;3 1{{spaces|em}}3 1 3 13

 a Provided here by a non-breaking space (&nbsp;).

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=subscript
text
{{sup sub}} text{{sup sub|sup|sub}}{{spaces|4}}{{sup sub|sup|sub}}text textsup
sub
    sup
sub
text
{{±}} 1.23{{±|superscript|subscript}} 1.23{{±|4|2}} 1.23+4
−2
{{overunderset}} {{underoverset}} {{overunderset|text|superscript|subscript}} {{overunderset|text|superscript|subscript}} superscripttextsubscript

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>