Changes

Jump to navigation Jump to search
1,808 bytes added ,  19:24, 30 March 2022
Created page with '{{Documentation subpage}}<!----Categories where indicated at the bottom of this page, please----> This template adds a formatted MediaWiki parser or extension t...'
{{Documentation subpage}}<!----Categories where indicated at the bottom of this page, please---->

This template adds a formatted MediaWiki parser or extension tag that links to the help or extension page. This template is similar to {{tl|tag}}, but it links the tag and defaults to open.

===Parser and extension tags===
<section begin="xtag" />{{Xtag/list}}<section end="xtag" />

===Parameters===
* '''first parameter''' ''(mandatory)'': the name of the HTML tag
* '''second parameter''': what type of tag to display:
** <code>p</code> or <code>pair</code>: display a matched pair of open-and-close tags
*** To suppress the ellipsis which appears between the tags, add an empty {{para|content}} parameter
** <code>o</code> or <code>open</code> ''(default)'': display only the opening tag of an open-and-close pair
** <code>c</code> or <code>close</code>: display only the closing tag of an open-and-close pair
** <code>s</code> or <code>single</code>: display a single tag
* '''content=''' the text content of the tags
* '''params=''' any parameters to be included in the opening tag

====Examples====
{{markup
|<nowiki>{{xtag|nowiki}}</nowiki>
|{{xtag|nowiki}}
|<nowiki>{{xtag|nowiki|s}}</nowiki>}
|{{xtag|nowiki|s}}
}}

Markup &rarr; Renders as: <br />
<code><nowiki>{{xtag | syntaxhighlight | p | params= enclose="div" lang="text"}}</nowiki> </code>&rarr;<br />
{{xtag | syntaxhighlight | p | params= enclose="div" lang="text"}}

===See also===
* {{tl|tag}}

====Other formatting templates====
{{#lsth:Template:Template-linking_templates|Other formatting templates}}
<includeonly>{{Sandbox other||
<!----Categories below this line, please:---->
[[Category:HTML typing-aid templates]]
[[Category:Wikitext typing-aid templates]]
[[Category:Wikipedia XHTML tag-replacing templates| ]]

}}</includeonly>
Bureaucrats, Check users, editor, emailconfirmed, Interface administrators, reviewer, smwadministrator, smwcurator, smweditor, Suppressors, Administrators
12,798

edits

Navigation menu