Template:Tag: Difference between revisions
Appearance
mediawiki>ExE Boss Use {{Yesno}} and TemplateStyles (match {{xtag}}) |
m 1 revision imported |
(No difference)
| |
Latest revision as of 08:23, 1 October 2025
<tag>...</tag>
Template:Hatnote Template:Uses TemplateStyles Template:TemplateData header
This template provides a quick way to mention an XML-style tag in a preformatted way. Mainly used in discussion/help pages.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Tag | 1 | The name of the HTML 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 |
Usage
Types
porpair– (default) display a matched pair of open-and-close tags: <div>...</div>ooropen– display only the opening tag of an open-and-close pair: <span>corclose– display only the closing tag of an open-and-close pair: </span>sorsingle– display a single tag: <br />
Examples
- Template:Tlx → <ref>...</ref>
- Template:Tlx → <ref>hello</ref>
- Template:Tlx → <span>foo</span>
- Template:Tlx → <span>
- Template:Tlx → <span>hello
- Template:Tlx → hello</span>
- Template:Tlx → <span>hello</span>
- Template:Tlx → <ref Template:Attr>
- Template:Tlx → <references />
- Template:Tlx → <br />
See also
- Template:Tlx
- Template:Tlx (Extension Tag)
The above documentation is transcluded from Template:Tag/doc. (edit | history)
Add categories to the /doc subpage. Subpages of this template.
Add categories to the /doc subpage. Subpages of this template.