The <figcaption> element is a caption or legend for its parent <figure>. It describes the rest of the figure’s contents and can give the figure an accessible name.
It must be the first or last child of that <figure>. For images, keep <img alt="…"> for the image’s own text alternative — do not replace alt with a caption alone.
Baseline · Widely available.
Not deprecated and not experimental. Stable across modern browsers since about July 2015.
Placement rule.
Only inside <figure>, and only as that figure’s first or last child — never between other figure children.
Syntax
HTML Syntax
syntax.html
<figcaption>caption text</figcaption>
Both start and end tags are required. Content is flow content (text, links, emphasis, and so on).
Reference
Attributes
<figcaption> has no element-specific attributes. Use globals when needed:
Do not insert siblings before the caption if it is meant to be first.
Either first or last is valid — pick one consistent pattern for your site.
Example 3 — Caption Plus alt
Use both: alt for the image alternative, figcaption for the visible figure caption.
HTML
<figure>
<img
src="/images/circle_image.jpg"
alt="Orange circle on a light background"
width="160"
height="160"
>
<figcaption>Figure 1. Demo circle used in layout tests.</figcaption>
</figure>
Put the code (or other content) as a figure child.
Add <figcaption> as first or last child to name the sample.
Use a specific caption (“Example 1…”) so readers can refer to it later.
Edge Cases & Pitfalls
Most figcaption bugs are wrong parent, wrong position, or confusing it with alt.
parent
Only inside figure
Do not put <figcaption> under <body> or <div> alone. Parent must be <figure>.
order
First or last child only
Never sandwich the caption between other figure children. Move it to the start or the end.
alt
Caption ≠ alt
alt is for the image alternative. figcaption captions the figure. Missing alt on meaningful images is still an accessibility problem.
count
One caption per figure
Use a single <figcaption>. Extra captions are invalid structure.
tables
Tables use caption
For data tables, use <caption> inside <table>, not figcaption.
Compatibility
Browser Support
The <figcaption> element is core HTML in every browser. It is not a Node.js, Deno, or Bun API.
✓ Baseline · Widely available
<figcaption>
Widely available since about July 2015. Chrome, Firefox, Safari, Edge, and Opera all support figure captions fully.
98%Global support (approx.)
Google ChromeAll
Full support
Mozilla FirefoxAll
Full support
Apple SafariAll
Full support
Microsoft EdgeAll
Full support
OperaAll
Full support
Samsung InternetAll
Full support
Internet Explorer9+
Supported
<figcaption>Widely supported
Bottom line: Safe to use everywhere inside a figure. Keep it first or last, and pair images with proper alt text.
Remember
Key Takeaways
Role:<figcaption> captions its parent <figure>.
Position: must be the first or last child of that figure.
With images: keep meaningful alt; caption is not a full substitute.
Scope: works for images, code, quotes, and other self-contained figures.
One line: put one clear <figcaption> as the first or last child of <figure>.
UA style
Default CSS Settings
Typical user-agent styling is minimal:
default.css
figcaption {
display: block;
}
Spacing, alignment, and italic captions come from your CSS. Style the parent figure when you want a shared frame around media and caption.
Frequently Asked Questions
The figcaption element is a caption or legend for its parent figure. It describes the rest of the figure’s contents and can provide the figure with an accessible name.
Only as a child of figure, and it must be either the first or the last child of that figure.
No. alt describes the image when it cannot be seen. figcaption captions the whole figure for everyone who can see the page. Use both when an image needs both jobs.
No. It only supports global attributes such as class, id, and lang.
No. A figure should have at most one figcaption, as the first or last child.
Yes. A figure can hold images, code, quotes, diagrams, and more. figcaption describes whatever that figure contains.