Шаблон:Xtag

Матеріал з Вікіпедії — вільної енциклопедії.
Перейти до навігації Перейти до пошуку

<tag>

{{i}} Документація шаблону[перегляд] [редагувати] [історія] [очистити кеш]

This template adds a formatted MediaWiki parser or extension tag that links to the help or extension page. This template is similar to {{tag}}, but it links the tag and defaults to open.

Parser and extension tags

Для автоматично згенерованого списку див. Special:Version#mw-version-parser-extensiontags. It may include tags not documented here.

Parser tags
<gallery>, <includeonly>, <noinclude>, <nowiki>, <onlyinclude>, <pre>
Extension tags
<categorytree>, <ce>, <chem>, <charinsert>, <graph>, <hiero>, <imagemap>, <indicator>, <inputbox>, <math>, <math chem>, <poem>, <ref>, <references>, <score>, <section>, <syntaxhighlight> (alias <source>), <templatedata>, <timeline>

Параметри

  • перший (необхідний): назва HTML теґа
  • другий: тип теґа для відображення:
    • p або pair: display a matched pair of open-and-close tags
      • To suppress the ellipsis which appears between the tags, add an empty |content= parameter
    • o або open (default): відобразити лише відкриваючий теґ з пари відкиваючий-закриваючий
    • c або close: відобразити лише закриваючий теґ з пари відкиваючий-закриваючий
    • s або single: відобразити єдиний (single) теґ
  • content= текстовий вміст ( content) теґів
  • params= any parameters to be included in the opening tag

Приклади

Розмітка Рендериться як
{{xtag|nowiki}}

<nowiki>

{{xtag|nowiki|s}}}

<nowiki />

{{xtag | syntaxhighlight | p | params= enclose="div" lang="text"}}

<syntaxhighlight enclose="div" lang="text">...</ syntaxhighlight >

Див. також