Difference between revisions of "Template:Tag"

From Krafties
Jump to navigation Jump to search
(Created page with "<onlyinclude>{| style="width:90%;margin:auto;{{{4|border:3px solid black}}}" !style="{{{3|background:cornflowerblue;color:white}}}"|{{{1}}} |- |style="text-align:center;"|{{{2...")
 
m
Line 2: Line 2:
 
!style="{{{3|background:cornflowerblue;color:white}}}"|{{{1}}}
 
!style="{{{3|background:cornflowerblue;color:white}}}"|{{{1}}}
 
|-
 
|-
|style="text-align:center;"|{{{2}}}
+
{{{2}}}
 
|}</onlyinclude>
 
|}</onlyinclude>
  

Revision as of 03:41, 17 August 2014

{{{2}}}
{{{1}}}
Documentation icon Template documentation ( view · talk · edit)
For the page status indicator Phabricator tags, see Template:ptag.

This template provides a quick way to mention an XML-style tag in a preformatted way. Mainly used in discussion/help pages.

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:
pair
font
    • o or open – display only the opening tag of an open-and-close pair:
open
span
    • c or close – display only the closing tag of an open-and-close pair:
close
span
    • s or single – display a single tag:
single
br
  • content= — the text content of the tags
  • params= — any parameters to be included in the opening tag

Examples

  • {{tag|ref}}
{{{2}}}
ref
  • {{tag|ref|content=hello}}
{{{2}}}
ref
  • {{tag|font|content=foo}}
{{{2}}}
font
  • {{tag|font|open}}
open
font
  • {{tag|font|open|content=hello}}
open
font
  • {{tag|span|close|content=hello}}
close
span
  • {{tag|span|pair|content=hello}}
pair
span
  • {{tag|ref|open|params=group=note}}
open
ref
  • {{tag|references|single}}
single
references
  • {{tag|br|single}}
single
br
The above documentation is transcluded from Template:Tag/doc.
Editors can experiment in this template's sandbox
Please add categories to the /doc subpage within
{{{2}}}
includeonly