Difference between revisions of "Template:Tag"
Jump to navigation
Jump to search
Template documentation ()
MyraMidnight (talk | contribs) m |
MyraMidnight (talk | contribs) m |
||
| Line 2: | Line 2: | ||
!style="background:{{{background|SlateBlue}}};color:{{{color|white}}};"|{{{title}}} | !style="background:{{{background|SlateBlue}}};color:{{{color|white}}};"|{{{title}}} | ||
|- | |- | ||
| − | |style="text-align:center;padding:3px;"|{{{message}}} | + | |style="text-align:{{{align|center}}};padding:3px;"|{{{message}}} |
|}<br></onlyinclude> | |}<br></onlyinclude> | ||
{{TemplateExplanation|[[Category:Tag Templates]] | {{TemplateExplanation|[[Category:Tag Templates]] | ||
| Line 9: | Line 9: | ||
===Default Colors - <code><nowiki>{{Tag}}</nowiki></code>=== | ===Default Colors - <code><nowiki>{{Tag}}</nowiki></code>=== | ||
:How to fill <code><nowiki>{{Tag|title=|message=}}</nowiki></code> | :How to fill <code><nowiki>{{Tag|title=|message=}}</nowiki></code> | ||
| − | :*<code | + | :*<code>title=</code>Tag heading |
| − | :*<code | + | :*<code>message=</code>Tag content |
| + | :*<code>align=</code> '''optional''', lets you change the text-align of the message | ||
===With Custom Color for border/title=== | ===With Custom Color for border/title=== | ||
Revision as of 04:55, 30 March 2015
| {{{title}}} |
|---|
| {{{message}}} |
- For the page status indicator Phabricator tags, see Template:ptag.
This template provides a quick way to mention an XML-style tag in a preformatted way. Mainly used in discussion/help pages.
Usage
- first parameter — (mandatory) the name of the HTML tag
- second parameter — what type of tag to display:
porpair– (default) display a matched pair of open-and-close tags:
| {{{title}}} |
|---|
| {{{message}}} |
ooropen– display only the opening tag of an open-and-close pair:
| {{{title}}} |
|---|
| {{{message}}} |
corclose– display only the closing tag of an open-and-close pair:
| {{{title}}} |
|---|
| {{{message}}} |
sorsingle– display a single tag:
| {{{title}}} |
|---|
| {{{message}}} |
- content= — the text content of the tags
- params= — any parameters to be included in the opening tag
Examples
{{tag|ref}}→
| {{{title}}} |
|---|
| {{{message}}} |
{{tag|ref|content=hello}}→
| {{{title}}} |
|---|
| {{{message}}} |
{{tag|font|content=foo}}→
| {{{title}}} |
|---|
| {{{message}}} |
{{tag|font|open}}→
| {{{title}}} |
|---|
| {{{message}}} |
{{tag|font|open|content=hello}}→
| {{{title}}} |
|---|
| {{{message}}} |
{{tag|span|close|content=hello}}→
| {{{title}}} |
|---|
| {{{message}}} |
{{tag|span|pair|content=hello}}→
| {{{title}}} |
|---|
| {{{message}}} |
{{tag|ref|open|params=group=note}}→
| {{{title}}} |
|---|
| {{{message}}} |
{{tag|references|single}}→
| {{{title}}} |
|---|
| {{{message}}} |
{{tag|br|single}}→
| {{{title}}} |
|---|
| {{{message}}} |
- The above documentation is transcluded from Template:Tag/doc.
- Editors can experiment in this template's sandbox
- Please add categories to the /doc subpage within
| {{{title}}} |
|---|
| {{{message}}} |