Template:Xtag
[edit] Template documentation
This template outputs a formatted MediaWiki parser or extension tag that links to the help or extension page about it. It is similar in function and behavior to {{Tag}}, but it links the tag and defaults to an open value for the second positional (unnamed) parameter.
Parser and extension tags
For a machine-generated list, see Special:Version#mw-version-parser-extensiontags, it may include tags not documented here.
- Parser tags
,,,,and- Extension tags
,,,,,,,,,and(alias)
Parameters
- unnamed first parameter or
|1=(mandatory): the name of the tag - unnamed second parameter or
|2=(optional): what type of tag to display; valid values areooropen(default): display only the opening tag of an open-and-closed paircorclose: display only the closing tag of an open-and-closed pairsorsingle: display a single, self-closing tagporpair: display a matched pair of tags (open-and-closed)- To suppress the ellipsis (
…) which appears between the tags, add an empty|content=parameter
- To suppress the ellipsis (
|content=the text shown between the tags|params=any parameters to be included in the opening tag
Examples
Markup → renders as
{{Xtag|nowiki}}→
{{Xtag|nowiki|s}}→
{{Xtag|syntaxhighlight|p|params=enclose="div" lang="text"}}→
See also
- {{Tag}}