Jump to content
šŸ—³ļøšŸ–„ļø The Wikimedia Foundation December 2024 Developer Satisfaction Survey closes on the 2025-01-03. This survey helps us measure developer satisfaction, and prioritize work on tools and platforms for our technical contributors.

Template:Xtag

From wikiNonStop
Revision as of 07:03, 27 December 2024 by Majestix (talk | contribs) (1 revision imported: Initial )
(diff) ā† Older revision | Latest revision (diff) | Newer revision ā†’ (diff)

‎<tag>

Template documentation

Lua error: expandTemplate: template loop detected.

For the page status indicator Phabricator tags, see: {{Ptag}}.

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.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Tag1

The name of the Extension tag.

Default
tag
Example
pre
Linerequired
Type2

What type of tag to display, see documentation for possible values.

Suggested values
p pair o open c close s single
Default
open
Stringoptional
Contentcontent

The text content of the tag. By default ā€œ...ā€ for pair type, empty for others; unused if type is single.

Contentoptional
Parametersparams

Parameters (attributes) for the opening tag, unused in close type.

Example
{{attr|foo|"bar"}}
Lineoptional
Plain displayplain

Avoid using monospace font and grey background for the tag.

Default
0
Auto value
1
Booleanoptional
Wrap?wrap

Whether to not add `style="white-space: nowrap;"` to the enclosing <code> tag.

Default
0
Auto value
1
Booleanoptional

Parameters

  • first parameter (mandatory): the name of the HTML tag
  • second parameter: what type of tag to display:
    • p or pair: display a matched pair of open-and-close tags
      • To suppress the ellipsis which appears between the tags, add an empty |content= parameter
    • o or open (default): display only the opening tag of an open-and-close pair
    • c or close: display only the closing tag of an open-and-close pair
    • s or single: 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:

See also