Diese Übersetzung ist unvollständig. Bitte helfen Sie, diesen Artikel aus dem Englischen zu übersetzen.
Zusammenfassung
Das HTML-Element <caption> (oder auch HTML-Tabellenüberschrift-Element) stellt den Titel einer Tabelle dar. Somit it dieses immer das erste untergeordnete Element einer Tabelle (<table>). Das Layout wird über CSS festegelegt, es ist relativ zur Tabelle.
| Inhaltskategorie | Keine |
|---|---|
| erlaubter Inhalt | Fließender Inhalt. |
| Auslassbare Tags | Keine, sowohl das Anfangs- als auch das End-Tag sind erforderlich. |
| erlaubte elterliche Elemente | A <table> element, as its first descendant. |
| DOM-Schnittstelle | HTMLTableCaptionElement |
Attribute
Dieses Dokument unterstützt die globalen Attribute.
alignUnerwünscht HTML4.01 Veraltet seit HTML5- This enumerated attribute indicates how the caption must be aligned with respect to the table. It may have the following values:
left, displayed to the left of the tabletop, displayed before the the tableright, displayed to the right of the tablebottom, displayed under the table
Usage note: Do not use this attribute, as it has been deprecated: the<caption>element should be styled using CSS. To give a similar effect to thealignattribute, use the the CSS propertiescaption-sideandtext-align.
Examples
Please see the <table> page for examples on <caption>
Specifications
| Specification | Status | Comment |
|---|---|---|
| WHATWG HTML Living Standard Die Definition von '<caption>' in dieser Spezifikation. |
Lebender Standard | |
| HTML5 Die Definition von '<caption>' in dieser Spezifikation. |
Empfehlung | |
| HTML 4.01 Specification Die Definition von '<caption>' in dieser Spezifikation. |
Empfehlung |
Browser compatibility
| Feature | Chrome | Edge | Firefox (Gecko) | Internet Explorer | Opera | Safari |
|---|---|---|---|---|---|---|
| Basic support | (Ja) | (Ja) | 1.0 (1.7 oder früher) | (Ja) | (Ja) | (Ja) |
| Feature | Android | Edge | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
|---|---|---|---|---|---|---|
| Basic support | (Ja) | (Ja) | 1.0 (1.0) | (Ja) | (Ja) | (Ja) |

