Help:HTML in wikitext/de
![]() |
Hinweis: Wenn Du diese Seite bearbeitest, stimmst Du zu, dass Dein Beitrag unter der [CC0] veröffentlicht wird. Mehr Informationen findest du auf der Public Domain Hilfeseite. | ![]() |
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.
Erlaubte HTML-Tags
Tag | Bedeutung | Allowed attributes | Erlaubt seit… | Anmerkungen |
---|---|---|---|---|
<abbr> |
Abkürzung | 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> |
Zeilenumbruch | 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> |
Gelöschter 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> |
Metadaten | 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> |
Tiefgestellt | common attributes | 1.1 | |
<sup> |
Hochgestellt | common attributes | 1.1 | |
<table> |
Table, for tabular data. | common attributes + summary , width , border , frame , rules , cellspacing , cellpadding , align , bgcolor |
1.1 | Wikitext: Siehe die Hilfeseite über Tabellen. |
<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: Siehe die Hilfeseite über Tabellen. |
<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: Siehe die Hilfeseite über Tabellen. |
<time> |
Datum/Zeit | 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> |
Nicht geordnete Liste. | common attributes + type |
1.1 | |
<var> |
Variable | common attributes | 1.1 | |
<wbr> |
Line break opportunity. | common attributes | 1.22 |
Common attributes
The following attributes are permitted on almost all tags listed in the table above (except meta
and link
):
Deprecated tags
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 | Erlaubt seit… | Emits Lint error? | Anmerkungen |
---|---|---|---|
<center> |
1.1 | Ja | |
<font> |
1.1 | Ja | |
<rb> |
1.1 | Nein | |
<rtc> |
1.24 | Nein | |
<strike> |
1.1 | Ja | |
<tt> |
1.1 | Ja |
Anwendungsfälle
Anchor
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-Formattierung
Mit den style
-Attribut
Using HTML tag instead of wikitext equivalent allows you to add a style
attribute to define a custom display through CSS language.
Mit den class
- und id
-Attributen
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
HTML-Kommentare
Wikitext uses HTML comment syntax for its own comments: the parser ignores them, they are not rendered in resulting HTML source.
<!-- 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
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.
Siehe auch
- Hilfe:Erweiterung:Linter – Help about Linter extension, which notices HTML issues in pages.
- HTML-Beschränkung – Information about MediaWiki's default limitations for HTML content, and extensions that expand its support.
- Handbuch:$wgRawHtml – Erweiterungen, die weiteres HTML erlauben.