Difference between revisions of "Template:Tag"
Jump to navigation
Jump to search
Template documentation ()
MyraMidnight (talk | contribs) m |
MyraMidnight (talk | contribs) m |
||
| Line 1: | Line 1: | ||
| − | <onlyinclude>{| style="width:90%;margin:auto; | + | <onlyinclude>{| style="width:90%;margin:auto;border:2px solid black" |
| − | !style="{{{ | + | !style="background:{{{1|cornflowerblue}}};color:{{{2|white}}}"|{{{3}}} |
|- | |- | ||
| − | |{{{ | + | |{{{4}}} |
|}</onlyinclude> | |}</onlyinclude> | ||
| Line 9: | Line 9: | ||
===<code><nowiki>{{Tag||||}}</nowiki></code>=== | ===<code><nowiki>{{Tag||||}}</nowiki></code>=== | ||
:How to fill in <code><nowiki>{{Tag|1|2|3|4}}</nowiki></code> | :How to fill in <code><nowiki>{{Tag|1|2|3|4}}</nowiki></code> | ||
| + | :#Header BACKGROUND color | ||
| + | :#Header FONT color | ||
:#Tag heading | :#Tag heading | ||
:#Tag content | :#Tag content | ||
| − | |||
| − | |||
}} | }} | ||
Revision as of 04:56, 17 August 2014
| {{{3}}} |
|---|
| {{{4}}} |
- 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:
| {{{3}}} |
|---|
| {{{4}}} |
ooropen– display only the opening tag of an open-and-close pair:
| {{{3}}} |
|---|
| {{{4}}} |
corclose– display only the closing tag of an open-and-close pair:
| {{{3}}} |
|---|
| {{{4}}} |
sorsingle– display a single tag:
| {{{3}}} |
|---|
| {{{4}}} |
- content= — the text content of the tags
- params= — any parameters to be included in the opening tag
Examples
{{tag|ref}}→
| {{{3}}} |
|---|
| {{{4}}} |
{{tag|ref|content=hello}}→
| {{{3}}} |
|---|
| {{{4}}} |
{{tag|font|content=foo}}→
| {{{3}}} |
|---|
| {{{4}}} |
{{tag|font|open}}→
| {{{3}}} |
|---|
| {{{4}}} |
{{tag|font|open|content=hello}}→
| {{{3}}} |
|---|
| {{{4}}} |
{{tag|span|close|content=hello}}→
| {{{3}}} |
|---|
| {{{4}}} |
{{tag|span|pair|content=hello}}→
| {{{3}}} |
|---|
| {{{4}}} |
{{tag|ref|open|params=group=note}}→
| {{{3}}} |
|---|
| {{{4}}} |
{{tag|references|single}}→
| {{{3}}} |
|---|
| {{{4}}} |
{{tag|br|single}}→
| {{{3}}} |
|---|
| {{{4}}} |
- 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
| {{{3}}} |
|---|
| {{{4}}} |