Zusammenfassung
Das HTML-Element <caption>
(oder auch HTML-Tabellenüberschrift-Element) stellt den Titel einer Tabelle dar. Somit ist 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.
align
Unerwü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 thealign
attribute, use the the CSS propertiescaption-side
andtext-align
.
Examples
Specifications
Specification | Status | Comment |
---|---|---|
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
Wir konvertieren die Kompatibilitätsdaten in ein maschinenlesbares JSON Format.
Diese Kompatibilitätstabelle liegt noch im alten Format vor,
denn die darin enthaltenen Daten wurden noch nicht konvertiert.
Finde heraus wie du helfen kannst!
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) |