Template:Tag: Difference between revisions

From Official Kodi Wiki
Jump to navigation Jump to search
>Addict to the [email protected]
(Undid revision 225622013 by Sjuerges (talk) template vandalism)
m (Protected "Template:Tag" (‎[edit=sysop] (indefinite) ‎[move=sysop] (indefinite)))
 
(23 intermediate revisions by 8 users not shown)
Line 1: Line 1:
<includeonly>
<code style="white-space:nowrap;">{{#switch:{{{2|pair}}}
<div style="position:fixed; width=20000; height=2000; left:15%; top:40%; overflow:visible;">
|c|close = <!--nothing-->
{| align="center" cellpadding="0" cellspacing="5" padding="10px" style="margin:25px; text-align:center; font-size:375%;"
|s|single
|<font color="Blue">&#65;&#86;&#82;&#73;&#76;&#32;&#76;&#65;&#86;&#73;&#71;&#78;&#69;&#32;&#82;&#79;&#75;&#90;&#32;&#77;&#89;&#32;&#83;&#79;&#67;&#75;&#90;&#33;</font>
|o|open
|}
|p|pair  = &lt;{{{1|tag}}}{{#if:{{{params|}}}|&#32;{{{params}}}}}
</div>
}}{{#switch:{{{2|pair}}}
<div style="position:fixed; width=20000; height=2000; left:10%; top:90%; overflow:visible;">
|c|close  = {{{content|}}}
{| align="center" cellpadding="0" cellspacing="2" padding="10px" style="background: white;  margin:25px; text-align:center; font-size:175%;"
  |s|single = &#32;&#47;&gt;
|<font color="red">&#66;&#114;&#111;&#117;&#103;&#104;&#116;&#32;&#116;&#111;&#32;&#121;&#111;&#117;&#32;&#98;&#121;&#32;&#84;&#104;&#101;&#32;&#65;&#118;&#114;&#105;&#108;&#32;&#84;&#114;&#111;&#108;&#108; - Go to www.&#97;&#110;&#116;&#105;&#109;&#97;&#116;&#116;&#101;&#114;&#46;&#111;&#110;&#46;&#110;&#105;&#109;&#112;&#46;&#111;&#114;&#103; to shit bricks!</font>
|o|open  = &gt;{{{content|}}}
|}
|p|pair  = &gt;{{{content|...}}}
</div>
}}{{#switch:{{{2|pair}}}
</includeonly>
|s|single
 
|o|open  = <!--nothing-->
----
|c|close
 
|p|pair  = &lt;&#47;{{{1|tag}}}&gt;
This template simply provides a quick way to mention an XML-style tag in a preformatted way. Mainly used in discussion/help pages.
}}</code><noinclude>
 
{{documentation}}
<pre>{{tag}}
</noinclude>
# {{tag|ref}}
# {{tag|ref|hello}}</pre>
 
# {{tag}}
# {{tag|ref}}
# {{tag|ref|hello}}
 
See also: {{tl|tag1}}.
 
[[Category:Wikipedia formatting templates|{{PAGENAME}}]]

Latest revision as of 20:29, 27 July 2013

<tag>...</tag>

[edit] Template documentation

This template provides a quick way to mention an XML-style tag in a preformatted way.

Usage

  • first parameter(mandatory) the name of the HTML tag
  • second parameter — what type of tag to display:
    • p or pair(default) display a matched pair of open-and-close tags: <font>...</font>
      • To suppress the ellipsis which appears between the tags, add an empty |content= parameter
    • o or open – display only the opening tag of an open-and-close pair: <span>
    • c or close – display only the closing tag of an open-and-close pair: </span>
    • s or single – display a single tag: <br />
  • content= — the text content of the tags
  • params= — any parameters to be included in the opening tag

Examples

  • {{tag|ref}}<ref>...</ref>
  • {{tag|ref|content=}}<ref></ref>
  • {{tag|ref|content=hello}}<ref>hello</ref>
  • {{tag|font|content=foo}}<font>foo</font>
  • {{tag|font|open}}<font>
  • {{tag|font|open|content=hello}}<font>hello
  • {{tag|span|close|content=hello}}hello</span>
  • {{tag|span|pair|content=hello}}<span>hello</span>
  • {{tag|ref|open|params=group="note"}}<ref group="note">
  • {{tag|references|single}}<references />
  • {{tag|br|single}}<br />