Template:Tag/doc: Difference between revisions
Appearance
m 1 revision imported |
mNo edit summary |
||
| Line 160: | Line 160: | ||
<includeonly>{{Sandbox other|| | <includeonly>{{Sandbox other|| | ||
<!-- Categories below this line; interwikis at Wikidata --> | <!-- Categories below this line; interwikis at Wikidata --> | ||
[[Category: | [[Category:Template Documentation]] | ||
}}</includeonly> | }}</includeonly> | ||
{{#tag:syntaxhighlight||lang=text|style=display:none!important}} | {{#tag:syntaxhighlight||lang=text|style=display:none!important}} | ||
Revision as of 10:58, 1 October 2025
This is a template documentation subpage for Template:Tag.
It contains usage information, categories, and other content that is not part of the original template page.
It contains usage information, categories, and other content that is not part of the original template page.
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)