Misplaced Pages

Template:Tag/doc: Difference between revisions

Article snapshot taken from Wikipedia with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.
< Template:Tag Browse history interactively← Previous editNext edit →Content deleted Content addedVisualWikitext
Revision as of 16:45, 14 December 2014 editSardanaphalus (talk | contribs)119,752 editsm Parameters: margin-bottom before footnote← Previous edit Revision as of 16:47, 14 December 2014 edit undoSardanaphalus (talk | contribs)119,752 edits Examples: parameter id (type=)Next edit →
Line 80: Line 80:
| <nowiki>{{tag|ref|content=hello}}</nowiki> | {{tag|ref|content=hello}} | <nowiki>{{tag|ref|content=hello}}</nowiki> | {{tag|ref|content=hello}}
| <nowiki>{{tag|font|content=foo}}</nowiki> | {{tag|font|content=foo}} | <nowiki>{{tag|font|content=foo}}</nowiki> | {{tag|font|content=foo}}
| <nowiki>{{tag|font|open}}</nowiki> | {{tag|font|open}} | <nowiki>{{tag|font|type=open}}</nowiki> | {{tag|font|type=open}}
| <nowiki>{{tag|font|open|content=hello}}</nowiki> | {{tag|font|open|content=hello}} | <nowiki>{{tag|font|type=open|content=hello}}</nowiki> | {{tag|font|type=open|content=hello}}
| <nowiki>{{tag|span|close|content=hello}}</nowiki> | {{tag|span|close|content=hello}} | <nowiki>{{tag|span|type=close|content=hello}}</nowiki> | {{tag|span|type=close|content=hello}}
| <nowiki>{{tag|span|pair|content=hello}}</nowiki> | {{tag|span|pair|content=hello}} | <nowiki>{{tag|span|type=pair|content=hello}}</nowiki> | {{tag|span|type=pair|content=hello}}
| <nowiki>{{tag|ref|open|params=group="note"}}</nowiki> | {{tag|ref|open|params=group="note"}} | <nowiki>{{tag|ref|type=open|params=group="note"}}</nowiki> | {{tag|ref|type=open|params=group="note"}}
| <nowiki>{{tag|references|single}}</nowiki> | {{tag|references|single}} | <nowiki>{{tag|references|single}}</nowiki> | {{tag|references|single}}
| <nowiki>{{tag|br|single}}</nowiki> | {{tag|br|single}} | <nowiki>{{tag|br|single}}</nowiki> | {{tag|br|single}}

Revision as of 16:47, 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}}

<ref>...</ref>

{{tag|ref|content=}}

<ref></ref>

{{tag|ref|content=hello}}

<ref>hello</ref>

{{tag|font|content=foo}}

<font>foo</font>

{{tag|font|type=open}}

<font>...</font>

{{tag|font|type=open|content=hello}}

<font>hello</font>

{{tag|span|type=close|content=hello}}

<span>hello</span>

{{tag|span|type=pair|content=hello}}

<span>hello</span>

{{tag|ref|type=open|params=group="note"}}

<ref group="note">...</ref>

{{tag|references|single}}

<references />

{{tag|br|single}}

<br />

{{tag|!--|content=comment}}

<!--comment-->

See also

Template:Interwikitmp-grp