Help:HTML in wikitext: Difference between revisions
No edit summary |
Divinations (talk | contribs) m Reverted edits by ~2026-42680-12 (talk) to last version by Shirayuki Tags: Rollback Mobile edit Mobile web edit Advanced mobile edit |
||
| (25 intermediate revisions by 10 users not shown) | |||
| Line 7: | Line 7: | ||
== Allowed HTML tags and attributes == <!--T:2--> |
== Allowed HTML tags and attributes == <!--T:2--> |
||
</translate> |
</translate> |
||
{| class="wikitable sortable" |
{| class="wikitable sortable" |
||
|+<translate><!--T:104--> Allowed HTML tags and attributes in MediaWiki software</translate> |
|+<translate><!--T:104--> Allowed HTML tags and attributes in MediaWiki software</translate> |
||
! |
!scope="col"| <translate><!--T:3--> Tag</translate> |
||
! scope="col" class="unsortable" | <translate><!--T:4--> Meaning</translate> |
! scope="col" class="unsortable" | <translate><!--T:4--> Meaning</translate> |
||
! scope="col" class="unsortable" | [[phab:diffusion/MW/browse/master/includes/parser/Sanitizer.php$1376|<translate><!--T:109--> Allowed attributes</translate>]] |
! scope="col" class="unsortable" | [[phab:diffusion/MW/browse/master/includes/parser/Sanitizer.php$1376|<translate><!--T:109--> Allowed attributes</translate>]] |
||
| Line 18: | Line 17: | ||
|scope="row"| {{tag|abbr|open}} |
|scope="row"| {{tag|abbr|open}} |
||
| <translate><!--T:7--> Abbreviation</translate> |
| <translate><!--T:7--> Abbreviation</translate> |
||
| {{tmpl|0=[[#$1|$1]] |
|||
| [[#Common attributes|common attributes]] |
|||
|1={{tunit|id=114|2=Common attributes}} |
|||
}} |
|||
| data-sort-value="16" | 1.16 |
| data-sort-value="16" | 1.16 |
||
| |
| |
||
| Line 24: | Line 25: | ||
|scope="row"| {{tag|b|open}} |
|scope="row"| {{tag|b|open}} |
||
| <translate><!--T:8--> Bring attention</translate> |
| <translate><!--T:8--> Bring attention</translate> |
||
| {{tmpl|0=[[#$1|$1]] |
|||
| [[#Common attributes|common attributes]] |
|||
|1={{tunit|id=114|2=Common attributes}} |
|||
}} |
|||
| data-sort-value="1" | 1.1 |
| data-sort-value="1" | 1.1 |
||
| <translate><!--T:9--> Wikitext: three single quotes, e.g. <code><nowiki>Be careful to '''this text'''</nowiki></code>.</translate> |
| <translate><!--T:9--> Wikitext: three single quotes, e.g. <code><nowiki>Be careful to '''this text'''</nowiki></code>.</translate> |
||
| Line 30: | Line 33: | ||
|scope="row"| {{tag|bdi|open}} |
|scope="row"| {{tag|bdi|open}} |
||
| <translate><!--T:10--> Bidirectional isolate</translate> |
| <translate><!--T:10--> Bidirectional isolate</translate> |
||
| {{tmpl|0=[[#$1|$1]] |
|||
| [[#Common attributes|common attributes]] |
|||
|1={{tunit|id=114|2=Common attributes}} |
|||
}} |
|||
| data-sort-value="20" | 1.20 |
| data-sort-value="20" | 1.20 |
||
| |
| |
||
| Line 36: | Line 41: | ||
|scope="row"| {{tag|bdo|open}} |
|scope="row"| {{tag|bdo|open}} |
||
| <translate><!--T:11--> Bidirectional text override</translate> |
| <translate><!--T:11--> Bidirectional text override</translate> |
||
| {{tmpl|0=[[#$1|$1]] |
|||
| [[#Common attributes|common attributes]] |
|||
|1={{tunit|id=114|2=Common attributes}} |
|||
}} |
|||
| data-sort-value="22" | 1.22 |
| data-sort-value="22" | 1.22 |
||
| |
| |
||
| Line 42: | Line 49: | ||
|scope="row"| {{tag|big|open}} |
|scope="row"| {{tag|big|open}} |
||
| <translate><!--T:103--> Make text bigger</translate> |
| <translate><!--T:103--> Make text bigger</translate> |
||
| {{tmpl|0=[[#$1|$1]] |
|||
| [[#Common attributes|common attributes]] |
|||
|1={{tunit|id=114|2=Common attributes}} |
|||
}} |
|||
| data-sort-value="1" | 1.1 |
| data-sort-value="1" | 1.1 |
||
| <translate><!--T:105--> <tvar name=2>{{tag|big|open}}</tvar> is deprecated in HTML, but not in wikitext</translate> ([[phab:T154067|T154067]]) |
| <translate><!--T:105--> <tvar name=2>{{tag|big|open}}</tvar> is deprecated in HTML, but not in wikitext</translate> ([[phab:T154067|T154067]]) |
||
| Line 48: | Line 57: | ||
|scope="row"| {{tag|blockquote|open}} |
|scope="row"| {{tag|blockquote|open}} |
||
| <translate><!--T:12--> Block quotation</translate> |
| <translate><!--T:12--> Block quotation</translate> |
||
| {{tmpl|0=[[#$1|$1]] |
|||
| [[#Common attributes|common attributes]] + <code>cite</code> |
|||
|1={{tunit|id=114|2=Common attributes}} |
|||
}} + <code>cite</code> |
|||
| data-sort-value="1" | 1.1 |
| data-sort-value="1" | 1.1 |
||
| |
| |
||
| Line 54: | Line 65: | ||
|scope="row"| {{tag|br|open}} |
|scope="row"| {{tag|br|open}} |
||
| <translate><!--T:13--> Line break</translate> |
| <translate><!--T:13--> Line break</translate> |
||
| {{tmpl|0=[[#$1|$1]] |
|||
| [[#Common attributes|common attributes]] + <code>clear</code> |
|||
|1={{tunit|id=114|2=Common attributes}} |
|||
}} + <code>clear</code> |
|||
| data-sort-value="1" | 1.1 |
| data-sort-value="1" | 1.1 |
||
| |
| |
||
| Line 60: | Line 73: | ||
|scope="row"| {{tag|caption|open}} |
|scope="row"| {{tag|caption|open}} |
||
| <translate><!--T:14--> Table caption</translate> |
| <translate><!--T:14--> Table caption</translate> |
||
| {{tmpl|0=[[#$1|$1]] |
|||
| [[#Common attributes|common attributes]] + <code>align</code> |
|||
|1={{tunit|id=114|2=Common attributes}} |
|||
}} + <code>align</code> |
|||
| data-sort-value="1" | 1.1 |
| data-sort-value="1" | 1.1 |
||
| |
| |
||
| Line 66: | Line 81: | ||
|scope="row"| {{tag|cite|open}} |
|scope="row"| {{tag|cite|open}} |
||
| <translate><!--T:15--> Citation, i.e. reference to a cited creative work.</translate> |
| <translate><!--T:15--> Citation, i.e. reference to a cited creative work.</translate> |
||
| {{tmpl|0=[[#$1|$1]] |
|||
| [[#Common attributes|common attributes]] |
|||
|1={{tunit|id=114|2=Common attributes}} |
|||
}} |
|||
| data-sort-value="1" | 1.1 |
| data-sort-value="1" | 1.1 |
||
| |
| |
||
| Line 72: | Line 89: | ||
|scope="row"| {{tag|code|open}} |
|scope="row"| {{tag|code|open}} |
||
| <translate><!--T:16--> Inline computer code</translate> |
| <translate><!--T:16--> Inline computer code</translate> |
||
| {{tmpl|0=[[#$1|$1]] |
|||
| [[#Common attributes|common attributes]] |
|||
|1={{tunit|id=114|2=Common attributes}} |
|||
}} |
|||
| data-sort-value="1" | 1.1 |
| data-sort-value="1" | 1.1 |
||
| |
| |
||
| Line 78: | Line 97: | ||
|scope="row"| {{tag|col|open}} |
|scope="row"| {{tag|col|open}} |
||
| |
| |
||
| {{tmpl|0=[[#$1|$1]] |
|||
| [[#Common attributes|common attributes]] + <code>span</code> |
|||
|1={{tunit|id=114|2=Common attributes}} |
|||
}} + <code>span</code> |
|||
| |
| |
||
| |
| |
||
| Line 84: | Line 105: | ||
|scope="row"| {{tag|colgroup|open}} |
|scope="row"| {{tag|colgroup|open}} |
||
| |
| |
||
| {{tmpl|0=[[#$1|$1]] |
|||
| [[#Common attributes|common attributes]] + <code>span</code> |
|||
|1={{tunit|id=114|2=Common attributes}} |
|||
}} + <code>span</code> |
|||
| |
| |
||
| |
| |
||
| Line 90: | Line 113: | ||
|scope="row"| {{tag|data|open}} |
|scope="row"| {{tag|data|open}} |
||
| <translate><!--T:17--> Data, linked to machine-readable translation through <code>value</code> attribute.</translate> |
| <translate><!--T:17--> Data, linked to machine-readable translation through <code>value</code> attribute.</translate> |
||
| {{tmpl|0=[[#$1|$1]] |
|||
| [[#Common attributes|common attributes]] + <code>value</code> |
|||
|1={{tunit|id=114|2=Common attributes}} |
|||
}} + <code>value</code> |
|||
| data-sort-value="21" | 1.21 |
| data-sort-value="21" | 1.21 |
||
| |
| |
||
| Line 96: | Line 121: | ||
|scope="row"| {{tag|dd|open}} |
|scope="row"| {{tag|dd|open}} |
||
| <translate><!--T:18--> Description details for a description term element, inside a description list.</translate> |
| <translate><!--T:18--> Description details for a description term element, inside a description list.</translate> |
||
| {{tmpl|0=[[#$1|$1]] |
|||
| [[#Common attributes|common attributes]] |
|||
|1={{tunit|id=114|2=Common attributes}} |
|||
}} |
|||
| data-sort-value="1" | 1.1 |
| data-sort-value="1" | 1.1 |
||
| <translate><!--T:101--> Wikitext: <tvar name=1><code>:</code></tvar> starting the line, respectively for description list details.</translate> |
| <translate><!--T:101--> Wikitext: <tvar name=1><code>:</code></tvar> starting the line, respectively for description list details.</translate> |
||
| Line 102: | Line 129: | ||
|scope="row"| {{tag|del|open}} |
|scope="row"| {{tag|del|open}} |
||
| <translate><!--T:19--> Deleted text</translate> |
| <translate><!--T:19--> Deleted text</translate> |
||
| {{tmpl|0=[[#$1|$1]] |
|||
| [[#Common attributes|common attributes]] + <code>cite</code>, <code>datetime</code> |
|||
|1={{tunit|id=114|2=Common attributes}} |
|||
}} + <code>cite</code>, <code>datetime</code> |
|||
| data-sort-value="3" | 1.3 |
| data-sort-value="3" | 1.3 |
||
| |
| |
||
| Line 108: | Line 137: | ||
|scope="row"| {{tag|dfn|open}} |
|scope="row"| {{tag|dfn|open}} |
||
| <translate><!--T:20--> Definition. Wrap a term/phrase which is being defined.</translate> |
| <translate><!--T:20--> Definition. Wrap a term/phrase which is being defined.</translate> |
||
| {{tmpl|0=[[#$1|$1]] |
|||
| [[#Common attributes|common attributes]] |
|||
|1={{tunit|id=114|2=Common attributes}} |
|||
}} |
|||
| data-sort-value="17" | 1.17 |
| data-sort-value="17" | 1.17 |
||
| |
| |
||
| Line 114: | Line 145: | ||
|scope="row"| {{tag|div|open}} |
|scope="row"| {{tag|div|open}} |
||
| <translate><!--T:21--> Content division, to apply CSS formatting to a block.</translate> |
| <translate><!--T:21--> Content division, to apply CSS formatting to a block.</translate> |
||
| {{tmpl|0=[[#$1|$1]] |
|||
| [[#Common attributes|common attributes]] + <code>align</code> |
|||
|1={{tunit|id=114|2=Common attributes}} |
|||
}} + <code>align</code> |
|||
| data-sort-value="1" | 1.1 |
| data-sort-value="1" | 1.1 |
||
| |
| |
||
| Line 120: | Line 153: | ||
|scope="row"| {{tag|dl|open}} |
|scope="row"| {{tag|dl|open}} |
||
| <translate><!--T:22--> Description list.</translate> |
| <translate><!--T:22--> Description list.</translate> |
||
| {{tmpl|0=[[#$1|$1]] |
|||
| [[#Common attributes|common attributes]] |
|||
|1={{tunit|id=114|2=Common attributes}} |
|||
}} |
|||
| data-sort-value="1" | 1.1 |
| data-sort-value="1" | 1.1 |
||
| |
| |
||
| Line 126: | Line 161: | ||
|scope="row"| {{tag|dt|open}} |
|scope="row"| {{tag|dt|open}} |
||
| <translate><!--T:23--> Description term, inside a description list.</translate> |
| <translate><!--T:23--> Description term, inside a description list.</translate> |
||
| {{tmpl|0=[[#$1|$1]] |
|||
| [[#Common attributes|common attributes]] |
|||
|1={{tunit|id=114|2=Common attributes}} |
|||
}} |
|||
| data-sort-value="1" | 1.1 |
| data-sort-value="1" | 1.1 |
||
| <translate><!--T:102--> Wikitext: <tvar name=1><code>;</code></tvar> starting the line, respectively for description list term.</translate> |
| <translate><!--T:102--> Wikitext: <tvar name=1><code>;</code></tvar> starting the line, respectively for description list term.</translate> |
||
| Line 132: | Line 169: | ||
|scope="row"| {{tag|em|open}} |
|scope="row"| {{tag|em|open}} |
||
| <translate><!--T:24--> Emphasis</translate> |
| <translate><!--T:24--> Emphasis</translate> |
||
| {{tmpl|0=[[#$1|$1]] |
|||
| [[#Common attributes|common attributes]] |
|||
|1={{tunit|id=114|2=Common attributes}} |
|||
}} |
|||
| data-sort-value="1" | 1.1 |
| data-sort-value="1" | 1.1 |
||
| |
| |
||
| Line 138: | Line 177: | ||
|scope="row"| {{tag|h1|open}} |
|scope="row"| {{tag|h1|open}} |
||
| <translate><!--T:25--> Section heading – levels 1 to 6</translate> |
| <translate><!--T:25--> Section heading – levels 1 to 6</translate> |
||
| {{tmpl|0=[[#$1|$1]] |
|||
| [[#Common attributes|common attributes]] + <code>align</code> |
|||
|1={{tunit|id=114|2=Common attributes}} |
|||
}} + <code>align</code> |
|||
| data-sort-value="1" | 1.1 |
| data-sort-value="1" | 1.1 |
||
| <translate><!--T:26--> Wikitext: pairs of equal signs (see [[<tvar name=1>Special:MyLanguage/Help:Formatting</tvar>|help about formatting]]).</translate> |
| <translate><!--T:26--> Wikitext: pairs of equal signs (see [[<tvar name=1>Special:MyLanguage/Help:Formatting</tvar>|help about formatting]]).</translate> |
||
| Line 145: | Line 186: | ||
|scope="row"| {{tag|hr|open}} |
|scope="row"| {{tag|hr|open}} |
||
| <translate><!--T:28--> Thematic break</translate> |
| <translate><!--T:28--> Thematic break</translate> |
||
| {{tmpl|0=[[#$1|$1]] |
|||
| [[#Common attributes|common attributes]] + <code>width</code> |
|||
|1={{tunit|id=114|2=Common attributes}} |
|||
}} + <code>width</code> |
|||
| data-sort-value="1" | 1.1 |
| data-sort-value="1" | 1.1 |
||
| <translate><!--T:29--> Wikitext: 4+ dashes (<tvar name=1><code>----</code></tvar>) starting a line.</translate> |
| <translate><!--T:29--> Wikitext: 4+ dashes (<tvar name=1><code>----</code></tvar>) starting a line.</translate> |
||
| Line 151: | Line 194: | ||
|scope="row"| {{tag|i|open}} |
|scope="row"| {{tag|i|open}} |
||
| <translate><!--T:30--> Idiomatic text</translate> |
| <translate><!--T:30--> Idiomatic text</translate> |
||
| {{tmpl|0=[[#$1|$1]] |
|||
| [[#Common attributes|common attributes]] |
|||
|1={{tunit|id=114|2=Common attributes}} |
|||
}} |
|||
| data-sort-value="1" | 1.1 |
| data-sort-value="1" | 1.1 |
||
| <translate><!--T:31--> Wikitext: two single quotes, e.g. <code><nowiki>''idiomatic text''</nowiki></code>.</translate> |
| <translate><!--T:31--> Wikitext: two single quotes, e.g. <code><nowiki>''idiomatic text''</nowiki></code>.</translate> |
||
| Line 157: | Line 202: | ||
|scope="row"| {{tag|ins|open}} |
|scope="row"| {{tag|ins|open}} |
||
| <translate><!--T:32--> Added text</translate> |
| <translate><!--T:32--> Added text</translate> |
||
| {{tmpl|0=[[#$1|$1]] |
|||
| [[#Common attributes|common attributes]] + <code>cite</code>, <code>datetime</code> |
|||
|1={{tunit|id=114|2=Common attributes}} |
|||
}} + <code>cite</code>, <code>datetime</code> |
|||
| data-sort-value="3" | 1.3 |
| data-sort-value="3" | 1.3 |
||
| |
| |
||
| Line 163: | Line 210: | ||
|scope="row"| {{tag|kbd|open}} |
|scope="row"| {{tag|kbd|open}} |
||
| <translate><!--T:33--> Keyboard input</translate> |
| <translate><!--T:33--> Keyboard input</translate> |
||
| {{tmpl|0=[[#$1|$1]] |
|||
| [[#Common attributes|common attributes]] |
|||
|1={{tunit|id=114|2=Common attributes}} |
|||
}} |
|||
| data-sort-value="17" | 1.17 |
| data-sort-value="17" | 1.17 |
||
| |
| |
||
| Line 169: | Line 218: | ||
|scope="row"| {{tag|li|open}} |
|scope="row"| {{tag|li|open}} |
||
| <translate><!--T:34--> List item</translate> |
| <translate><!--T:34--> List item</translate> |
||
| {{tmpl|0=[[#$1|$1]] |
|||
| [[#Common attributes|common attributes]] + <code>type</code>, <code>value</code> |
|||
|1={{tunit|id=114|2=Common attributes}} |
|||
}} + <code>type</code>, <code>value</code> |
|||
| data-sort-value="1" | 1.1 |
| data-sort-value="1" | 1.1 |
||
| <translate><!--T:35--> Wikitext: <tvar name=1><code>#</code></tvar> or <tvar name=2><code>*</code></tvar> starting the line, respectively for ordered list and unordered list.</translate> |
| <translate><!--T:35--> Wikitext: <tvar name=1><code>#</code></tvar> or <tvar name=2><code>*</code></tvar> starting the line, respectively for ordered list and unordered list.</translate> |
||
| Line 177: | Line 228: | ||
| <code>itemprop</code>, <code>href</code>, <code>title</code> |
| <code>itemprop</code>, <code>href</code>, <code>title</code> |
||
| data-sort-value="27" | 1.27 |
| data-sort-value="27" | 1.27 |
||
| <translate><!--T:37--> Must have <tvar name=1><code>itemprop</code></tvar> and <tvar name=2><code>href</code></tvar> attributes set.</translate><ref name="validateTags">[[phab:source/mediawiki/browse/ |
| <translate><!--T:37--> Must have <tvar name=1><code>itemprop</code></tvar> and <tvar name=2><code>href</code></tvar> attributes set.</translate><ref name="validateTags">[[phab:source/mediawiki/browse/master/includes/Parser/Sanitizer.php$413|Parser\Sanitizer::validateTag()]]</ref> <translate><!--T:115--> [[<tvar name=url>wmdoc:mediawiki-core/master/php/Sanitizer_8php_source.html</tvar>|Excludes most values for <tvar name=1><code>rel</code></tvar>, including the <tvar name=2><code>stylesheet</code></tvar> value]].</translate> |
||
|- |
|- |
||
|scope="row"| {{tag|mark|open}} |
|scope="row"| {{tag|mark|open}} |
||
| <translate><!--T:38--> Marked or highlighted text.</translate> |
| <translate><!--T:38--> Marked or highlighted text.</translate> |
||
| {{tmpl|0=[[#$1|$1]] |
|||
| [[#Common attributes|common attributes]] |
|||
|1={{tunit|id=114|2=Common attributes}} |
|||
}} |
|||
| data-sort-value="21" | 1.21 |
| data-sort-value="21" | 1.21 |
||
| |
| |
||
| Line 193: | Line 246: | ||
|scope="row"| {{tag|ol|open}} |
|scope="row"| {{tag|ol|open}} |
||
| <translate><!--T:41--> Ordered list</translate> |
| <translate><!--T:41--> Ordered list</translate> |
||
| {{tmpl|0=[[#$1|$1]] |
|||
| [[#Common attributes|common attributes]] + <code>type</code>, <code>start</code>, <code>reversed</code> |
|||
|1={{tunit|id=114|2=Common attributes}} |
|||
}} + <code>type</code>, <code>start</code>, <code>reversed</code> |
|||
| data-sort-value="1" | 1.1 |
| data-sort-value="1" | 1.1 |
||
| |
| |
||
| Line 199: | Line 254: | ||
|scope="row"| {{tag|p|open}} |
|scope="row"| {{tag|p|open}} |
||
| <translate><!--T:42--> Paragraph</translate> |
| <translate><!--T:42--> Paragraph</translate> |
||
| {{tmpl|0=[[#$1|$1]] |
|||
| [[#Common attributes|common attributes]] + <code>align</code> |
|||
|1={{tunit|id=114|2=Common attributes}} |
|||
}} + <code>align</code> |
|||
| data-sort-value="1" | 1.1 |
| data-sort-value="1" | 1.1 |
||
| <translate><!--T:43--> Wikitext: text between empty lines.</translate> |
| <translate><!--T:43--> Wikitext: text between empty lines.</translate> |
||
| Line 205: | Line 262: | ||
|scope="row"| {{tag|pre|open}} |
|scope="row"| {{tag|pre|open}} |
||
| <translate><!--T:44--> Preformatted text</translate> |
| <translate><!--T:44--> Preformatted text</translate> |
||
| {{tmpl|0=[[#$1|$1]] |
|||
| [[#Common attributes|common attributes]] + <code>width</code> |
|||
|1={{tunit|id=114|2=Common attributes}} |
|||
}} + <code>width</code> |
|||
| data-sort-value="1" | 1.1 |
| data-sort-value="1" | 1.1 |
||
| <translate><!--T:45--> Content is not parsed, as in a <tvar name=1>{{tag|nowiki|open}}</tvar> tag.</translate> |
| <translate><!--T:45--> Content is not parsed, as in a <tvar name=1>{{tag|nowiki|open}}</tvar> tag.</translate> |
||
| Line 212: | Line 271: | ||
|scope="row"| {{tag|q|open}} |
|scope="row"| {{tag|q|open}} |
||
| <translate><!--T:47--> Inline quotation</translate> |
| <translate><!--T:47--> Inline quotation</translate> |
||
| {{tmpl|0=[[#$1|$1]] |
|||
| [[#Common attributes|common attributes]] + <code>cite</code> |
|||
|1={{tunit|id=114|2=Common attributes}} |
|||
}} + <code>cite</code> |
|||
| data-sort-value="22" | 1.22 |
| data-sort-value="22" | 1.22 |
||
| |
| |
||
| Line 218: | Line 279: | ||
|scope="row"| {{tag|rp|open}} |
|scope="row"| {{tag|rp|open}} |
||
| <translate><!--T:48--> Ruby fallback parenthesis</translate> |
| <translate><!--T:48--> Ruby fallback parenthesis</translate> |
||
| {{tmpl|0=[[#$1|$1]] |
|||
| [[#Common attributes|common attributes]] |
|||
|1={{tunit|id=114|2=Common attributes}} |
|||
}} |
|||
| data-sort-value="1" | 1.1 |
| data-sort-value="1" | 1.1 |
||
| |
| |
||
| Line 224: | Line 287: | ||
|scope="row"| {{tag|rt|open}} |
|scope="row"| {{tag|rt|open}} |
||
| <translate><!--T:49--> Ruby text: annotation rendered near the base text. Inside a <tvar name=1><code>ruby</code></tvar> tag.</translate> |
| <translate><!--T:49--> Ruby text: annotation rendered near the base text. Inside a <tvar name=1><code>ruby</code></tvar> tag.</translate> |
||
| {{tmpl|0=[[#$1|$1]] |
|||
| [[#Common attributes|common attributes]] |
|||
|1={{tunit|id=114|2=Common attributes}} |
|||
}} |
|||
| data-sort-value="1" | 1.1 |
| data-sort-value="1" | 1.1 |
||
| |
| |
||
| Line 230: | Line 295: | ||
|scope="row"| {{tag|ruby|open}} |
|scope="row"| {{tag|ruby|open}} |
||
| <translate><!--T:50--> Ruby annotation. Encloses <tvar name=1><code>rt</code></tvar> and <tvar name=2><code>rp</code></tvar>.</translate> |
| <translate><!--T:50--> Ruby annotation. Encloses <tvar name=1><code>rt</code></tvar> and <tvar name=2><code>rp</code></tvar>.</translate> |
||
| {{tmpl|0=[[#$1|$1]] |
|||
| [[#Common attributes|common attributes]] |
|||
|1={{tunit|id=114|2=Common attributes}} |
|||
}} |
|||
| data-sort-value="1" | 1.1 |
| data-sort-value="1" | 1.1 |
||
| |
| |
||
| Line 236: | Line 303: | ||
|scope="row"| {{tag|s|open}} |
|scope="row"| {{tag|s|open}} |
||
| <translate><!--T:51--> Strikethrough, for no longer accurate or relevant text.</translate> |
| <translate><!--T:51--> Strikethrough, for no longer accurate or relevant text.</translate> |
||
| {{tmpl|0=[[#$1|$1]] |
|||
| [[#Common attributes|common attributes]] |
|||
|1={{tunit|id=114|2=Common attributes}} |
|||
}} |
|||
| data-sort-value="1" | 1.1 |
| data-sort-value="1" | 1.1 |
||
| |
| |
||
| Line 242: | Line 311: | ||
|scope="row"| {{tag|samp|open}} |
|scope="row"| {{tag|samp|open}} |
||
| <translate><!--T:52--> Sample output, inline ouput text of a computer program.</translate> |
| <translate><!--T:52--> Sample output, inline ouput text of a computer program.</translate> |
||
| {{tmpl|0=[[#$1|$1]] |
|||
| [[#Common attributes|common attributes]] |
|||
|1={{tunit|id=114|2=Common attributes}} |
|||
}} |
|||
| data-sort-value="17" | 1.17 |
| data-sort-value="17" | 1.17 |
||
| |
| |
||
| Line 248: | Line 319: | ||
|scope="row"| {{tag|small|open}} |
|scope="row"| {{tag|small|open}} |
||
| <translate><!--T:53--> Side comment.</translate> |
| <translate><!--T:53--> Side comment.</translate> |
||
| {{tmpl|0=[[#$1|$1]] |
|||
| [[#Common attributes|common attributes]] |
|||
|1={{tunit|id=114|2=Common attributes}} |
|||
}} |
|||
| data-sort-value="1" | 1.1 |
| data-sort-value="1" | 1.1 |
||
| |
| |
||
| Line 254: | Line 327: | ||
|scope="row"| {{tag|span|open}} |
|scope="row"| {{tag|span|open}} |
||
| <translate><!--T:54--> Content span, to apply CSS formatting to an inline text.</translate> |
| <translate><!--T:54--> Content span, to apply CSS formatting to an inline text.</translate> |
||
| {{tmpl|0=[[#$1|$1]] |
|||
| [[#Common attributes|common attributes]] |
|||
|1={{tunit|id=114|2=Common attributes}} |
|||
}} |
|||
| data-sort-value="10" | 1.4 |
| data-sort-value="10" | 1.4 |
||
| |
| |
||
| Line 260: | Line 335: | ||
|scope="row"| {{tag|strong|open}} |
|scope="row"| {{tag|strong|open}} |
||
| <translate><!--T:55--> Strong importance.</translate> |
| <translate><!--T:55--> Strong importance.</translate> |
||
| {{tmpl|0=[[#$1|$1]] |
|||
| [[#Common attributes|common attributes]] |
|||
|1={{tunit|id=114|2=Common attributes}} |
|||
}} |
|||
| data-sort-value="1" | 1.1 |
| data-sort-value="1" | 1.1 |
||
| |
| |
||
| Line 266: | Line 343: | ||
|scope="row"| {{tag|sub|open}} |
|scope="row"| {{tag|sub|open}} |
||
| <translate><!--T:56--> Subscript</translate> |
| <translate><!--T:56--> Subscript</translate> |
||
| {{tmpl|0=[[#$1|$1]] |
|||
| [[#Common attributes|common attributes]] |
|||
|1={{tunit|id=114|2=Common attributes}} |
|||
}} |
|||
| data-sort-value="1" | 1.1 |
| data-sort-value="1" | 1.1 |
||
| |
| |
||
| Line 272: | Line 351: | ||
|scope="row"| {{tag|sup|open}} |
|scope="row"| {{tag|sup|open}} |
||
| <translate><!--T:57--> Superscript</translate> |
| <translate><!--T:57--> Superscript</translate> |
||
| {{tmpl|0=[[#$1|$1]] |
|||
| [[#Common attributes|common attributes]] |
|||
|1={{tunit|id=114|2=Common attributes}} |
|||
}} |
|||
| data-sort-value="1" | 1.1 |
| data-sort-value="1" | 1.1 |
||
| |
| |
||
| Line 278: | Line 359: | ||
|scope="row"| {{tag|table|open}} |
|scope="row"| {{tag|table|open}} |
||
| <translate><!--T:58--> Table, for tabular data.</translate> |
| <translate><!--T:58--> Table, for tabular data.</translate> |
||
| {{tmpl|0=[[#$1|$1]] |
|||
| [[#Common attributes|common attributes]] + <code>summary</code>, <code>width</code>, <code>border</code>, <code>frame</code>, <code>rules</code>, <code>cellspacing</code>, <code>cellpadding</code>, <code>align</code>, <code>bgcolor</code> |
|||
|1={{tunit|id=114|2=Common attributes}} |
|||
}} + <code>summary</code>, <code>width</code>, <code>border</code>, <code>frame</code>, <code>rules</code>, <code>cellspacing</code>, <code>cellpadding</code>, <code>align</code>, <code>bgcolor</code> |
|||
| data-sort-value="1" | 1.1 |
| data-sort-value="1" | 1.1 |
||
| <translate><!--T:59--> Wikitext: [[<tvar name=1>Special:MyLanguage/Help:Tables</tvar>|see help page about tables]].</translate> |
| <translate><!--T:59--> Wikitext: [[<tvar name=1>Special:MyLanguage/Help:Tables</tvar>|see help page about tables]].</translate> |
||
| Line 284: | Line 367: | ||
|scope="row"| {{tag|td|open}} |
|scope="row"| {{tag|td|open}} |
||
| <translate><!--T:60--> Table data cell, inside a <tvar name=1><code>tr</code></tvar> tag.</translate> |
| <translate><!--T:60--> Table data cell, inside a <tvar name=1><code>tr</code></tvar> tag.</translate> |
||
| {{tmpl|0=[[#$1|$1]] |
|||
| [[#Common attributes|common attributes]] + <code>abbr</code>, <code>axis</code>, <code>headers</code>, <code>scope</code>, <code>rowspan</code>, <code>colspan</code>, <code>nowrap</code>, <code>width</code>, <code>height</code>, <code>bgcolor</code>, <code>align</code>, <code>valign</code> |
|||
|1={{tunit|id=114|2=Common attributes}} |
|||
}} + <code>abbr</code>, <code>axis</code>, <code>headers</code>, <code>scope</code>, <code>rowspan</code>, <code>colspan</code>, <code>nowrap</code>, <code>width</code>, <code>height</code>, <code>bgcolor</code>, <code>align</code>, <code>valign</code> |
|||
| data-sort-value="1" | 1.1 |
| data-sort-value="1" | 1.1 |
||
| <translate><!--T:61--> Wikitext: [[<tvar name=1>Special:MyLanguage/Help:Tables</tvar>|see help page about tables]].</translate> |
| <translate><!--T:61--> Wikitext: [[<tvar name=1>Special:MyLanguage/Help:Tables</tvar>|see help page about tables]].</translate> |
||
| Line 290: | Line 375: | ||
|scope="row"| {{tag|th|open}} |
|scope="row"| {{tag|th|open}} |
||
| <translate><!--T:62--> Table header cell, inside a <tvar name=1><code>tr</code></tvar> tag</translate> |
| <translate><!--T:62--> Table header cell, inside a <tvar name=1><code>tr</code></tvar> tag</translate> |
||
| {{tmpl|0=[[#$1|$1]] |
|||
| [[#Common attributes|common attributes]] + <code>abbr</code>, <code>axis</code>, <code>headers</code>, <code>scope</code>, <code>rowspan</code>, <code>colspan</code>, <code>nowrap</code>, <code>width</code>, <code>height</code>, <code>bgcolor</code>, <code>align</code>, <code>valign</code> |
|||
|1={{tunit|id=114|2=Common attributes}} |
|||
}} + <code>abbr</code>, <code>axis</code>, <code>headers</code>, <code>scope</code>, <code>rowspan</code>, <code>colspan</code>, <code>nowrap</code>, <code>width</code>, <code>height</code>, <code>bgcolor</code>, <code>align</code>, <code>valign</code> |
|||
| data-sort-value="1" | 1.1 |
| data-sort-value="1" | 1.1 |
||
| <translate><!--T:63--> Wikitext: [[<tvar name=1>Special:MyLanguage/Help:Tables</tvar>|see help page about tables]].</translate> |
| <translate><!--T:63--> Wikitext: [[<tvar name=1>Special:MyLanguage/Help:Tables</tvar>|see help page about tables]].</translate> |
||
| Line 296: | Line 383: | ||
|scope="row"| {{tag|time|open}} |
|scope="row"| {{tag|time|open}} |
||
| <translate><!--T:64--> Date/Time</translate> |
| <translate><!--T:64--> Date/Time</translate> |
||
| {{tmpl|0=[[#$1|$1]] |
|||
| [[#Common attributes|common attributes]] + <code>datetime</code> |
|||
|1={{tunit|id=114|2=Common attributes}} |
|||
}} + <code>datetime</code> |
|||
| data-sort-value="21" | 1.21 |
| data-sort-value="21" | 1.21 |
||
| |
| |
||
| Line 302: | Line 391: | ||
|scope="row"| {{tag|tr|open}} |
|scope="row"| {{tag|tr|open}} |
||
| <translate><!--T:65--> Table row, inside a <tvar name=1><code>table</code></tvar> tag.</translate> |
| <translate><!--T:65--> Table row, inside a <tvar name=1><code>table</code></tvar> tag.</translate> |
||
| {{tmpl|0=[[#$1|$1]] |
|||
| [[#Common attributes|common attributes]] + <code>bgcolor</code>, <code>align</code>, <code>valign</code> |
|||
|1={{tunit|id=114|2=Common attributes}} |
|||
}} + <code>bgcolor</code>, <code>align</code>, <code>valign</code> |
|||
| data-sort-value="1" | 1.1 |
| data-sort-value="1" | 1.1 |
||
| <translate><!--T:66--> Wikitext: [[<tvar name=1>Special:MyLanguage/Help:Tables</tvar>|see help page about tables]].</translate> |
| <translate><!--T:66--> Wikitext: [[<tvar name=1>Special:MyLanguage/Help:Tables</tvar>|see help page about tables]].</translate> |
||
| Line 308: | Line 399: | ||
|scope="row"| {{tag|u|open}} |
|scope="row"| {{tag|u|open}} |
||
| <translate><!--T:67--> Unarticulated annotation.</translate> |
| <translate><!--T:67--> Unarticulated annotation.</translate> |
||
| {{tmpl|0=[[#$1|$1]] |
|||
| [[#Common attributes|common attributes]] |
|||
|1={{tunit|id=114|2=Common attributes}} |
|||
}} |
|||
| data-sort-value="1" | 1.1 |
| data-sort-value="1" | 1.1 |
||
| |
| |
||
| Line 314: | Line 407: | ||
|scope="row"| {{tag|ul|open}} |
|scope="row"| {{tag|ul|open}} |
||
| <translate><!--T:68--> Unordered list.</translate> |
| <translate><!--T:68--> Unordered list.</translate> |
||
| {{tmpl|0=[[#$1|$1]] |
|||
| [[#Common attributes|common attributes]] + <code>type</code> |
|||
|1={{tunit|id=114|2=Common attributes}} |
|||
}} + <code>type</code> |
|||
| data-sort-value="1" | 1.1 |
| data-sort-value="1" | 1.1 |
||
| |
| |
||
| Line 320: | Line 415: | ||
|scope="row"| {{tag|var|open}} |
|scope="row"| {{tag|var|open}} |
||
| <translate><!--T:69--> Variable</translate> |
| <translate><!--T:69--> Variable</translate> |
||
| {{tmpl|0=[[#$1|$1]] |
|||
| [[#Common attributes|common attributes]] |
|||
|1={{tunit|id=114|2=Common attributes}} |
|||
}} |
|||
| data-sort-value="1" | 1.1 |
| data-sort-value="1" | 1.1 |
||
| |
| |
||
| Line 326: | Line 423: | ||
|scope="row"| {{tag|wbr|open}} |
|scope="row"| {{tag|wbr|open}} |
||
| <translate><!--T:70--> Line break opportunity.</translate> |
| <translate><!--T:70--> Line break opportunity.</translate> |
||
| {{tmpl|0=[[#$1|$1]] |
|||
| [[#Common attributes|common attributes]] |
|||
|1={{tunit|id=114|2=Common attributes}} |
|||
}} |
|||
| data-sort-value="22" | 1.22 |
| data-sort-value="22" | 1.22 |
||
| |
| |
||
| Line 332: | Line 431: | ||
<translate> |
<translate> |
||
=== Common attributes === <!--T: |
=== Common attributes === <!--T:114--> |
||
<!--T:112--> |
<!--T:112--> |
||
| Line 369: | Line 468: | ||
<translate> |
<translate> |
||
=== Deprecated tags === <!--T:71--> |
=== Deprecated tags === <!--T:71--> |
||
</translate> |
</translate> |
||
| Line 376: | Line 474: | ||
{| class="wikitable sortable" |
{| class="wikitable sortable" |
||
|+<translate><!--T:106--> HTML tags deprecated in MediaWiki</translate> |
|+ <translate><!--T:106--> HTML tags deprecated in MediaWiki</translate> |
||
!scope="col" |
!scope="col"| <translate><!--T:73--> Tag</translate> |
||
!scope="col" style="width:5ex" |
!scope="col" style="width:5ex"| <translate><!--T:74--> Allowed since…</translate> |
||
!scope="col" style="width:5ex" |
!scope="col" style="width:5ex"| <translate><!--T:107--> Emits [[<tvar name=1>Special:MyLanguage/Help:Lint_errors</tvar>|Lint error]]?</translate> |
||
!scope="col" class="unsortable" |
!scope="col" class="unsortable"| <translate><!--T:75--> Notes</translate> |
||
|- |
|- |
||
|scope="row"| {{tag|center|open}} |
|scope="row"| {{tag|center|open}} |
||
| Line 425: | Line 523: | ||
=== CSS formatting === <!--T:80--> |
=== CSS formatting === <!--T:80--> |
||
</translate> |
|||
==== With <tvar name=1>style</tvar> attribute ==== <!--T:81--> |
|||
<translate nowrap> |
|||
==== With <tvar name=1><code>style</code></tvar> attribute ==== <!--T:81--> |
|||
<!--T:82--> |
<!--T:82--> |
||
Using HTML tag instead of wikitext equivalent allows you to add a <tvar name=1><code>style</code></tvar> attribute to define a custom display through [[:en:CSS|CSS language]]. |
Using HTML tag instead of wikitext equivalent allows you to add a <tvar name=1><code>style</code></tvar> attribute to define a custom display through [[:en:CSS|CSS language]]. |
||
==== With <tvar name=1>class</tvar> and <tvar name=2>id</tvar> attributes ==== <!--T:83--> |
|||
<translate nowrap> |
|||
==== With <tvar name=1><code>class</code></tvar> and <tvar name=2><code>id</code></tvar> attributes ==== <!--T:83--> |
|||
</translate> |
</translate> |
||
<translate><!--T:84--> Thanks to [[<tvar name=1>Special:MyLanguage/Help:TemplateStyles</tvar>|TemplateStyles]], you may add a custom stylesheet to the document.</translate> |
<translate><!--T:84--> Thanks to [[<tvar name=1>Special:MyLanguage/Help:TemplateStyles</tvar>|TemplateStyles]], you may add a custom stylesheet to the document.</translate> |
||
| Line 442: | Line 538: | ||
=== HTML comments === <!--T:86--> |
=== HTML comments === <!--T:86--> |
||
<!--T:87--> |
|||
Wikitext uses HTML comment syntax for its own comments. These comments are ignored by the parser and are not included in the output HTML — not even as HTML comments. |
|||
</translate> |
</translate> |
||
<translate><!--T:87--> Wikitext uses HTML comment syntax for its own comments.</translate> |
|||
<translate><!--T:113--> These comments are ignored by the parser and are not included in the output HTML — not even as HTML comments.</translate> |
|||
<syntaxhighlight lang=html> |
<syntaxhighlight lang=html> |
||
<!-- <translate nowrap><!--T:88--> This text is a wikitext comment. After saving, it will be kept in wikitext source but will not be displayed, neither rendered in HTML source.</translate> --> |
<!-- <translate nowrap><!--T:88--> This text is a wikitext comment. After saving, it will be kept in wikitext source but will not be displayed, neither rendered in HTML source.</translate> --> |
||
</syntaxhighlight> |
</syntaxhighlight> |
||
<translate nowrap> |
<translate nowrap> |
||
=== <tvar name=1> |
=== <tvar name=1>pre</tvar> tag === <!--T:89--> |
||
<!--T:90--> |
<!--T:90--> |
||
The content of a <tvar name=1><code>pre</code></tvar> tag is not parsed, as in a <tvar name=2>{{tag|nowiki|open}}</tvar> tag. |
The content of a <tvar name=1><code>pre</code></tvar> tag is not parsed, as in a <tvar name=2>{{tag|nowiki|open}}</tvar> tag. |
||
<translate> |
|||
<!--T:91--> |
<!--T:91--> |
||
You have to use the equivalent wikitext syntax to allow the content parsing. i.e. start each line with a blank space: |
You have to use the equivalent wikitext syntax to allow the content parsing. i.e. start each line with a blank space: |
||
| Line 464: | Line 557: | ||
<pre class="mw-highlight"> |
<pre class="mw-highlight"> |
||
<translate><!--T:92--> Some preformatted text which can contain wikitext, i.e. ''this idiomatic text'' will be parsed.</translate> |
<translate nowrap><!--T:92--> Some preformatted text which can contain wikitext, i.e. ''this idiomatic text'' will be parsed.</translate> |
||
<translate><!--T:100--> Other line.</translate> |
<translate nowrap><!--T:100--> Other line.</translate> |
||
</pre> |
</pre> |
||
Latest revision as of 06:30, 2 August 2026
| Note: When you edit this page, you agree to release your contribution under the CC0. See Public Domain Help Pages for more info. |
MediaWiki is able to parse some HTML tags in wikitext. Brackets for other tags are escaped and the tags are displayed instead of being parsed.
Allowed HTML tags and attributes
[edit | edit source]| Tag | Meaning | Allowed attributes | Tag allowed since… | Notes |
|---|---|---|---|---|
<abbr>
|
Abbreviation | Common attributes | 1.16 | |
<b>
|
Bring attention | Common attributes | 1.1 | Wikitext: three single quotes, e.g. Be careful to '''this text'''.
|
<bdi>
|
Bidirectional isolate | Common attributes | 1.20 | |
<bdo>
|
Bidirectional text override | Common attributes | 1.22 | |
<big>
|
Make text bigger | Common attributes | 1.1 | <big> is deprecated in HTML, but not in wikitext (T154067)
|
<blockquote>
|
Block quotation | Common attributes + cite
|
1.1 | |
<br>
|
Line break | Common attributes + clear
|
1.1 | |
<caption>
|
Table caption | Common attributes + align
|
1.1 | |
<cite>
|
Citation, i.e. reference to a cited creative work. | Common attributes | 1.1 | |
<code>
|
Inline computer code | Common attributes | 1.1 | |
<col>
|
Common attributes + span
|
|||
<colgroup>
|
Common attributes + span
|
|||
<data>
|
Data, linked to machine-readable translation through value attribute.
|
Common attributes + value
|
1.21 | |
<dd>
|
Description details for a description term element, inside a description list. | Common attributes | 1.1 | Wikitext: : starting the line, respectively for description list details.
|
<del>
|
Deleted text | Common attributes + cite, datetime
|
1.3 | |
<dfn>
|
Definition. Wrap a term/phrase which is being defined. | Common attributes | 1.17 | |
<div>
|
Content division, to apply CSS formatting to a block. | Common attributes + align
|
1.1 | |
<dl>
|
Description list. | Common attributes | 1.1 | |
<dt>
|
Description term, inside a description list. | Common attributes | 1.1 | Wikitext: ; starting the line, respectively for description list term.
|
<em>
|
Emphasis | Common attributes | 1.1 | |
<h1>
|
Section heading – levels 1 to 6 | Common attributes + align
|
1.1 | Wikitext: pairs of equal signs (see help about formatting).
Note when you edit a section headed by an HTML heading, the edit summary will not be prefilled. |
<hr>
|
Thematic break | Common attributes + width
|
1.1 | Wikitext: 4+ dashes (----) starting a line.
|
<i>
|
Idiomatic text | Common attributes | 1.1 | Wikitext: two single quotes, e.g. ''idiomatic text''.
|
<ins>
|
Added text | Common attributes + cite, datetime
|
1.3 | |
<kbd>
|
Keyboard input | Common attributes | 1.17 | |
<li>
|
List item | Common attributes + type, value
|
1.1 | Wikitext: # or * starting the line, respectively for ordered list and unordered list.
|
<link>
|
External resource link | itemprop, href, title
|
1.27 | Must have itemprop and href attributes set.[1] Excludes most values for rel, including the stylesheet value.
|
<mark>
|
Marked or highlighted text. | Common attributes | 1.21 | |
<meta>
|
Metadata | itemprop, content
|
1.27 | Must have itemprop and content attributes set.[1]
|
<ol>
|
Ordered list | Common attributes + type, start, reversed
|
1.1 | |
<p>
|
Paragraph | Common attributes + align
|
1.1 | Wikitext: text between empty lines. |
<pre>
|
Preformatted text | Common attributes + width
|
1.1 | Content is not parsed, as in a <nowiki> tag.
Wikitext: line starting with a blank space, i.e. |
<q>
|
Inline quotation | Common attributes + cite
|
1.22 | |
<rp>
|
Ruby fallback parenthesis | Common attributes | 1.1 | |
<rt>
|
Ruby text: annotation rendered near the base text. Inside a ruby tag.
|
Common attributes | 1.1 | |
<ruby>
|
Ruby annotation. Encloses rt and rp.
|
Common attributes | 1.1 | |
<s>
|
Strikethrough, for no longer accurate or relevant text. | Common attributes | 1.1 | |
<samp>
|
Sample output, inline ouput text of a computer program. | Common attributes | 1.17 | |
<small>
|
Side comment. | Common attributes | 1.1 | |
<span>
|
Content span, to apply CSS formatting to an inline text. | Common attributes | 1.4 | |
<strong>
|
Strong importance. | Common attributes | 1.1 | |
<sub>
|
Subscript | Common attributes | 1.1 | |
<sup>
|
Superscript | Common attributes | 1.1 | |
<table>
|
Table, for tabular data. | Common attributes + summary, width, border, frame, rules, cellspacing, cellpadding, align, bgcolor
|
1.1 | Wikitext: see help page about tables. |
<td>
|
Table data cell, inside a tr tag.
|
Common attributes + abbr, axis, headers, scope, rowspan, colspan, nowrap, width, height, bgcolor, align, valign
|
1.1 | Wikitext: see help page about tables. |
<th>
|
Table header cell, inside a tr tag
|
Common attributes + abbr, axis, headers, scope, rowspan, colspan, nowrap, width, height, bgcolor, align, valign
|
1.1 | Wikitext: see help page about tables. |
<time>
|
Date/Time | Common attributes + datetime
|
1.21 | |
<tr>
|
Table row, inside a table tag.
|
Common attributes + bgcolor, align, valign
|
1.1 | Wikitext: see help page about tables. |
<u>
|
Unarticulated annotation. | Common attributes | 1.1 | |
<ul>
|
Unordered list. | Common attributes + type
|
1.1 | |
<var>
|
Variable | Common attributes | 1.1 | |
<wbr>
|
Line break opportunity. | Common attributes | 1.22 |
Common attributes
[edit | edit source]The following attributes are permitted on almost all tags listed in the table above (except meta and link):
- HTML
idclassstylelangdirtitletabindex
- WAI-ARIA
aria-describedbyaria-flowtoaria-hiddenaria-labelaria-labelledbyaria-levelaria-ownsrole
- RDFa
aboutpropertyresourcedatatypetypeof
- Microdata
itemiditempropitemrefitemscopeitemtype
Deprecated tags
[edit | edit source]The following tags are parsed by MediaWiki, but they are obsolete in HTML 5. They should be replaced with one of above tags.
You might add a style attribute to reproduce the expected display.
| Tag | Allowed since… | Emits Lint error? | Notes |
|---|---|---|---|
<center>
|
1.1 | Yes | |
<font>
|
1.1 | Yes | |
<rb>
|
1.1 | No | |
<rtc>
|
1.24 | No | |
<strike>
|
1.1 | Yes | |
<tt>
|
1.1 | Yes |
Use cases
[edit | edit source]Anchor
[edit | edit source]To create a linkable anchor, you can use any HTML tag with an id attribute.
E.g. <span id="note2"></span> allows you to create a link to its location on the page using [[#note2|See relevant note]].
CSS formatting
[edit | edit source]With style attribute
[edit | edit source]Using HTML tag instead of wikitext equivalent allows you to add a style attribute to define a custom display through CSS language.
With class and id attributes
[edit | edit source]Thanks to TemplateStyles, you may add a custom stylesheet to the document.
So it is useful to add class or id attributes to the elements you want to customize their display.
Overridden HTML syntax
[edit | edit source]HTML comments
[edit | edit source]Wikitext uses HTML comment syntax for its own comments. These comments are ignored by the parser and are not included in the output HTML — not even as HTML comments.
<!-- This text is a wikitext comment. After saving, it will be kept in wikitext source but will not be displayed, neither rendered in HTML source. -->
pre tag
[edit | edit source]The content of a pre tag is not parsed, as in a <nowiki> tag.
You have to use the equivalent wikitext syntax to allow the content parsing. i.e. start each line with a blank space:
Some preformatted text which can contain wikitext, i.e. ''this idiomatic text'' will be parsed. Other line.
to output:
Some preformatted text which can contain wikitext, i.e. this idiomatic text will be parsed. Other line.
See also
[edit | edit source]- Help:Extension:Linter – Help about Linter extension, which notices HTML issues in pages.
- HTML restriction – Information about MediaWiki's default limitations for HTML content, and extensions that expand its support.
- Manual:$wgRawHtml – Extensions allowing further HTML.