Modèle:Tag
Apparence
<tag>...</tag>
Documentation
Cette documentation est incluse dans la sous-page de documentation (voir | modifier | historique). Si vous voulez améliorer ce modèle et si celui-ci est protégé, demandez à un·e administrateur·ice de vous aider.
This template provides a quick way to mention an XML-style tag in a preformatted way. Mainly used in discussion/help pages.
| Paramètre | Description | Type | État | |
|---|---|---|---|---|
| Tag | 1 | The name of the HTML tag.
| Ligne de texte | obligatoire |
| Type | 2 | What type of tag to display, see documentation for possible values.
| Chaîne | facultatif |
| Content | content | The text content of the tag. By default “...” for pair type, empty for others; used even if type is single. | Contenu | facultatif |
| Parameters | params | Parameters (attributes) for the opening tag, unused in close type.
| Ligne de texte | facultatif |
| Plain display | plain | Avoid using monospace font and grey background for the tag. | Booléen | facultatif |
| Wrap? | wrap | Whether to not add `style="white-space: nowrap;"` to the enclosing <code> tag.
| Booléen | facultatif |
Usage
[modifier]Types
[modifier]porpair– (default) display a matched pair of open-and-close tags:<div>...</div>ooropen– display only the opening tag of an open-and-close pair:<span>corclose– display only the closing tag of an open-and-close pair:</span>sorsingle– display a single tag:<br />
Exemples
[modifier]{{tag|ref}}→<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|references|single}}→<references />{{tag|br|single}}→<br />
Voir aussi
[modifier]- Page de différents test du modèle : Modèle:Tag/Tests
- Balise
<code>