Skip to content
Tutorials Center
My learning

Topics

HTML Reference ยท Text Content

The <figcaption> element

Reference for the HTML <figcaption> element: captioning a figure, where the caption may go, how it relates to alt text and accessibility, and technical details.

The <figcaption> element is the caption of a <figure>. It labels or explains the figure's content: a title for a chart, a credit for a photo, the source of a quotation, a number such as "Figure 3".

HTML
<figure>
  <img src="/samples/sunset.svg" alt="Sun setting behind hills">
  <figcaption>Evening light, photographed in late June.</figcaption>
</figure>

Try it

Styled caption below a figure

Attributes

This element has no attributes of its own. It accepts the global attributes.

Usage notes

  • First or last child only. A <figcaption> must be the first or the last child of its <figure>, and a figure can have only one.
  • Captions add, alt describes. Don't repeat the image's alt text in the caption. The caption gives context everyone can see; alt replaces the image for people who can't see it.
  • Rich content is fine. A caption may contain links, emphasis, even short paragraphs or lists.
  • Accessibility. Browsers use the caption as the figure's accessible name, so a short, specific caption makes the figure easy to identify.
  • Not for tables. Use <caption> to title a <table>; <figcaption> belongs to figures only.

Technical summary

Content categories None
Permitted content Flow content
Tag omission None; both the start and end tags are required
Permitted parents A <figure>, as its first or last child
Implicit ARIA role No corresponding role
DOM interface HTMLElement
Default display block

Browser support

Supported in every browser.