Template:Tag: Difference between revisions
From Space Station 14 Wiki
(wip) |
(wip) |
||
Line 33: | Line 33: | ||
"label": "Tag name", | "label": "Tag name", | ||
"type": "line", | "type": "line", | ||
"required": true | "required": true, | ||
"description": "The XML/HTML tag's name.", | |||
"example": "\"code\", \"ref\"" | |||
}, | }, | ||
"2": { | "2": { | ||
Line 53: | Line 55: | ||
], | ], | ||
"default": "pair", | "default": "pair", | ||
"suggested": true, | |||
"description": "To indicate which of the tag's types is/are presented. See the template docs for details." | |||
}, | |||
"wrap": { | |||
"label": "Wrap", | |||
"description": "Disable nowrap for long samples, so allowing wraps (line breaks).", | |||
"type": "boolean", | |||
"suggestedvalues": [ | |||
"yes", | |||
"no" | |||
], | |||
"autovalue": "1" | |||
}, | |||
"style": { | |||
"label": "Style", | |||
"description": "Custom style.", | |||
"type": "string" | |||
}, | |||
"link": { | |||
"label": "Link", | |||
"description": "Link to the element's entry at the HTML element article.", | |||
"example": "This is only for HTML elements; the page is hard-coded, so it cannot be used for, e.g., XML elements from a particular schema. If desired, a feature for specifying the link page can be added.", | |||
"type": "boolean", | |||
"autovalue": "1" | |||
}, | |||
"attribs": { | |||
"aliases": [ | |||
"params" | |||
], | |||
"label": "Attributes", | |||
"description": "Attributes and values to be included as part of an open/start tag.", | |||
"type": "string", | |||
"suggested": true | "suggested": true | ||
}, | }, | ||
" | "content": { | ||
"label": "Content", | |||
"description": "Text to place between open/start and close/end tags.", | |||
"type": "string", | |||
"suggested": true | |||
} | |||
}, | }, | ||
"paramOrder": [ | "paramOrder": [ | ||
"1", | "1", | ||
"2", | "2", | ||
"content", | |||
"attribs", | |||
"wrap", | "wrap", | ||
"link", | "link", | ||
" | "style" | ||
] | ] | ||
} | } | ||
</templatedata></noinclude> | </templatedata></noinclude> |
Revision as of 11:06, 15 August 2024
<tag>...</tag>
External template
This template originates from an external source:
A markup tag is an open < and a close > angle brackets and the content within them, in a markup language, as XML or HTML:
For example, the <title> tag provides a title for the Web page.
This template provides a quick way to mention a markup-style tag in a preformatted way.
Examples
Syntax | Result |
---|---|
{{tag|ref}} | <ref>...</ref>
|
{{tag|ref|content=}} | <ref></ref>
|
{{tag|ref|content=hello}} | <ref>hello</ref>
|
{{tag|span|content=foo}} | <span>foo</span>
|
{{tag|span|open}} | <span>
|
{{tag|span|open|content=hello}} | <span>hello
|
{{tag|span|close|content=hello}} | hello</span>
|
{{tag|span|pair|content=hello}} | <span>hello</span>
|
{{tag|ref|open|attribs=group="note"}} | <ref group="note">
|
{{tag|references|single}} | <references />
|
{{tag|br|single}} | <br />
|
{{tag|!--|content=comment}} | <!--comment-->
|
{{tag|math|attribs=chem}} | <math chem>...</math>
|
{{tag|a |attribs=href="<nowiki>https://en.wikipedia.org/</nowiki>" |content=English Wikipedia}} | <a href="https://en.wikipedia.org/">English Wikipedia</a>
|
See also
- #tag:, the parser function that generates working tags.
No description.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Tag name | 1 | The XML/HTML tag's name.
| Line | required |
Tag type | 2 | To indicate which of the tag's types is/are presented. See the template docs for details.
| Line | suggested |
Content | content | Text to place between open/start and close/end tags. | String | suggested |
Attributes | attribs params | Attributes and values to be included as part of an open/start tag. | String | suggested |
Wrap | wrap | Disable nowrap for long samples, so allowing wraps (line breaks).
| Boolean | optional |
Link | link | Link to the element's entry at the HTML element article.
| Boolean | optional |
Style | style | Custom style. | String | optional |