Revision as of 16:47, 14 December 2014 editSardanaphalus (talk | contribs)119,752 edits →Examples: parameter id (type=)← Previous edit | Revision as of 16:50, 14 December 2014 edit undoSardanaphalus (talk | contribs)119,752 editsm →Parameters: precedence, indentationNext edit → | ||
Line 45: | Line 45: | ||
| <nowiki>|code</nowiki>{{int:dot-separator}}<nowiki>|name=ref</nowiki> | | <nowiki>|code</nowiki>{{int:dot-separator}}<nowiki>|name=ref</nowiki> | ||
| {{sans-serif|second unnamed}} |
| {{bigger|type}} {{sans-serif|(second unnamed)}} | ||
: p / pair | :: p / pair | ||
: o / open | :: o / open | ||
: c / close | :: c / close | ||
: s / single | :: s / single | ||
| To indicate which of the tag's types/versions is/are presented: | | To indicate which of the tag's types/versions is/are presented: | ||
: {{nowrap|''(default)'' Complementary open (start) and close (end) tag versions.{{sup|a}}}} | : {{nowrap|''(default)'' Complementary open (start) and close (end) tag versions.{{sup|a}}}} |
Revision as of 16:50, 14 December 2014
This is a documentation subpage for Template:Tag. It may contain usage information, categories and other content that is not part of the original template page. |
This template provides a quick way to mention an XML/HTML-style tag in a preformatted way. Mainly used on discussion/help pages.
Syntax examples
Template:Syntax descriptions/three columns
The name of the tag (as |name= or the first unnamed parameter) is required; combinations of the other parameters may be included or omitted.
- Full syntax
{{tag (|style=) |(name=)name (|(type=)type) (|params=parameters) (|content=content)}}
Parameters
Template:Parameter descriptions/with examples To suppress the ellipsis ("...") between the tags, add an empty content parameter ( ... |content=}} ).
Examples
Markup | Renders as |
---|---|
{{tag|ref}} |
|
{{tag|ref|content=}} |
|
{{tag|ref|content=hello}} |
|
{{tag|font|content=foo}} |
|
{{tag|font|type=open}} |
|
{{tag|font|type=open|content=hello}} |
|
{{tag|span|type=close|content=hello}} |
|
{{tag|span|type=pair|content=hello}} |
|
{{tag|ref|type=open|params=group="note"}} |
|
{{tag|references|single}} |
|
{{tag|br|single}} |
|
{{tag|!--|content=comment}} |
|
See also
- {{HTMLElement}}
- {{XMLElement}}
- {{xtag}} adds a MediaWiki parser or extension tag that links to the extension page.
- #tag:, the parser function that generates working tags.