Template:Xtag
<tag>
Lua error: expandTemplate: template loop detected.
This template uses TemplateStyles: |
Lua error: expandTemplate: template loop detected.
This template adds a formatted MediaWiki parser or extension tag that links to the help or extension page. This template is similar to {{tag}}, but it links the tag and defaults to open.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Tag | 1 | The name of the Extension tag.
| Line | required |
Type | 2 | What type of tag to display, see documentation for possible values.
| String | optional |
Content | content | The text content of the tag. By default ā...ā for pair type, empty for others; unused if type is single. | Content | optional |
Parameters | params | Parameters (attributes) for the opening tag, unused in close type.
| Line | optional |
Plain display | plain | Avoid using monospace font and grey background for the tag.
| Boolean | optional |
Wrap? | wrap | Whether to not add `style="white-space: nowrap;"` to the enclosing <code> tag.
| Boolean | optional |
Parameters
- first parameter (mandatory): the name of the HTML tag
- second parameter: what type of tag to display:
p
orpair
: display a matched pair of open-and-close tags- To suppress the ellipsis which appears between the tags, add an empty
|content=
parameter
- To suppress the ellipsis which appears between the tags, add an empty
o
oropen
(default): display only the opening tag of an open-and-close pairc
orclose
: display only the closing tag of an open-and-close pairs
orsingle
: display a single tag
- content= the text content of the tags
- params= any parameters to be included in the opening tag
Examples
Lua error: expandTemplate: template loop detected.
Markup → Renders as:
- {{xtag|templatestyles|s|params={{attr|lang|"Template:Uses TemplateStyles/example.css"}}}} →
<templatestyles src="Template:Uses TemplateStyles/example.css" />
- {{xtag|syntaxhighlight|p|params={{attr|lang|"text"}}}} →
<syntaxhighlight lang="text">...</syntaxhighlight>