Template:Escape template list

Revision as of 15:02, 26 February 2025 by ArrowHead294 (talk | contribs)
Template call Output HTML alternative
{{!}} (m) | | or {{pipe}}
{{=}} = =
{{!!}} || ||
{{!(}} [ [ or {{lbrack}}
{{)!}} ] ] or {{rbrack}}
{{!((}} [[ [[
{{))!}} ]] ]]
{{(}} { {
{{)}} } }
{{((}} {{ {{
{{))}} }} }}
{{(((}} {{{ {{{
{{)))}} }}} }}}
{{(!}} {| {|
{{!+}} |+ |+
{{!-}} |- |-
{{!)}} |} |}
{{'}} ' '
{{''}} '' ''
{{'''}} ''' '''
{{colon}} : :
{{^(}} < &#60; or &lt;
{{)^}} > &#62; or &gt;
{{**}} * &#42;
Template documentation[view] [edit] [history] [purge]
English Wikipedia has an article on:

Certain characters and character sequences have special meanings in Wiki markup. Sometimes, they need to be escaped, and these templates are used to do so.

Escaping these characters using templates simply delays their interpretation as Wiki markup, but if you type them using HTML entities or wrap them in <nowiki> tags, they will never be interpreted as markup.

Note: These escape templates should only be used when absolutely necessary, as overuse of such templates can make pages hard to read and edit in the source editor.

Usage

These templates are used to escape special character sequences, so that they are interpreted later than they would otherwise be. They are most useful when trying to include tables within other tables or templates.

The following example shows an instance of including a Wikitable within another Wikitable. This markup:

{| class="wikitable" style="text-align: center;"
|+ style="font-size: 105%;" | Caption text
|-
! Header text !! Header text
|-
| Example 1 || Example 2
|-
| Example 3 || Example 4
|-
| colspan="2" | {{(!}} class{{=}}"wikitable" style{{=}}"text-align: center;"
{{!+}} style{{=}}"font-size: 105%;" {{!}} Caption text
{{!-}}
! Header text !! Header text
{{!-}}
{{!}} Example 5 {{!!}} Example 6
{{!-}}
{{!}} Example 7 {{!!}} Example 8
{{!)}}
|}

gives:

Caption text
Header text Header text
Example 1 Example 2
Example 3 Example 4
Caption text
Header text Header text
Example 5 Example 6
Example 7 Example 8