Jump to content

Help:Template cheatsheet

From pool
Revision as of 22:02, 3 November 2020 by Caleb Cooper (talk | contribs) (Lists)
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|first key|2nd Key|3rd Key}} {{key press|Ctrl|Alt|Del}} Ctrl+Alt+Del Illustrates keys and keystrokes on a computer keyboard.
{{code}}
{{pre}}
{{pre2}}
{{tag}}


Quotes

Template Shortcut /

Alternative

Usage Example Rendered Description
{{poem}}
{{quote}} {{blockquote}}
{{quote box}}
{{quote frame}}
{{tweet}}

Alignment

Template Shortcut /

Alternative

Usage Example Rendered Description
{{right}}
{{left}}
{{center}}
{{center block}}
{{float}}
{{float left}}
{{float right}}
{{float center}}
{{clear}}
{{align}}
{{stack}}
{{image frame}}

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
{{color}}
{{font color}}
{{font}}
{{em}}
{{strong}}
{{nowrap}}
{{pad}}



sup & sub

Template Shortcut /

Alternative

Usage Example Rendered Description
{{sup}} text{{sup|superscript}} text{{sup|superscript}}{{spaces|4}}{{sup|superscript}}text textsuperscript    superscripttext
{{smallsup}} {{ssup}} text{{smallsup|small superscript}} text{{smallsup|small superscript}}{{spaces|4}}{{smallsup|small superscript}}text textsmall superscript    small superscripttext
{{i sup}} {{issup}} · {{padlssup}} ''text''{{i smallsup|small superscript}} ''text''{{i smallsup|small superscript}}{{spaces|2}}({{smaller|rather than:}} ''text''{{smallsup|small superscript}}) textsmall superscript  (rather than: textsmall superscript)
{{i smallsup}} {{issup}} · {{padlssup}}
{{b sup}} {{bsup}}
{{sub}} text{{sub|subscript}} text{{sub|subscript}}{{spaces|4}}{{sub|subscript}}text textsubscript    subscripttext
{{smallsub}} {{ssub}} text{{smallsub|small subscript}} text{{smallsub|small subscript}}{{spaces|4}}{{smallsub|small subscript}}text textsmall subscript    small subscripttext
{{subsub}} text{{subsub|double-subscripted}} text{{subsub|double-subscripted}}{{spaces|4}}{{subsub|double-subscripted}}text textdouble-subscripted    double-subscriptedtext
{{su}} text{{su|p=p=superscript|b=b=subscript}} text{{su|p=p=superscript|b=b=subscript}}{{spaces|4}}{{su|p=p=superscript|b=b=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
{{±}}
{{overunderset}} {{overunderset|text|superscript|subscript}} {{overunderset|text|superscript|subscript}} superscripttextsubscript
{{underoverset}}


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}}
{{multi-section link}} {{mslink}}

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>