--- title: slug: Web/HTML/Element/caption translation_of: Web/HTML/Element/caption ---

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 ({{HTMLElement("table")}}). Das Layout wird über CSS festegelegt, es ist relativ zur Tabelle.

Inhaltskategorie Keine
erlaubter Inhalt Fließender Inhalt.
Auslassbare Tags {{no_tag_omission}}
erlaubte elterliche Elemente A {{HTMLElement("table")}} element, as its first descendant.
DOM-Schnittstelle {{domxref("HTMLTableCaptionElement")}}

Attribute

Dieses Dokument unterstützt die globalen Attribute.

{{htmlattrdef("align")}} {{deprecatedGeneric('inline','HTML4.01')}} {{obsoleteGeneric('inline','HTML5')}}
This enumerated attribute indicates how the caption must be aligned with respect to the table. It may have the following values:
Usage note: Do not use this attribute, as it has been deprecated: the {{HTMLElement("caption")}} element should be styled using CSS. To give a similar effect to the align attribute, use the the CSS properties {{cssxref("caption-side")}} and {{cssxref("text-align")}}.

Examples

Please see the {{HTMLElement("table")}} page for examples on {{HTMLElement("caption")}}

Specifications

Specification Status Comment
{{SpecName('HTML WHATWG', 'tabular-data.html#the-caption-element', '<caption>')}} {{Spec2('HTML WHATWG')}}  
{{SpecName('HTML5 W3C', 'tabular-data.html#the-caption-element', '<caption>')}} {{Spec2('HTML5 W3C')}}  
{{SpecName('HTML4.01', 'struct/tables.html#h-11.2.2', '<caption>')}} {{Spec2('HTML4.01')}}  

Browser compatibility

{{CompatibilityTable}}

Feature Chrome Edge Firefox (Gecko) Internet Explorer Opera Safari
Basic support {{CompatVersionUnknown}} {{CompatVersionUnknown}} {{CompatGeckoDesktop("1.0")}} {{CompatVersionUnknown}} {{CompatVersionUnknown}} {{CompatVersionUnknown}}
Feature Android Edge Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support {{CompatVersionUnknown}} {{CompatVersionUnknown}} {{CompatGeckoMobile("1.0")}} {{CompatVersionUnknown}} {{CompatVersionUnknown}} {{CompatVersionUnknown}}

See also

{{HTMLRef}}