The <figure> element represents self-contained content — often an image, diagram, code sample, or quote — referenced as a single unit. An optional <figcaption> provides its caption (first or last child).
A figure is usually mentioned in the main text but can be moved (sidebar, appendix, another section) without breaking the document’s meaning. Prefer <img> with a real alt for pictures inside the figure.
Baseline · Widely available.
Not deprecated and not experimental. Stable across modern browsers since about July 2015.
One unit.
The figure, its caption, and its contents are treated together. Caption with at most one <figcaption>.
Keep the figure movable — the article can say “see the example above/below.”
One figcaption only for that figure.
Example 4 — Quote as a Figure
A block quote with attribution in the caption stays one self-contained unit.
HTML
<figure>
<blockquote>
If debugging is the process of removing software bugs,
then programming must be the process of putting them in.
</blockquote>
<figcaption>Edsger Dijkstra</figcaption>
</figure>
Many designs reset the side margin and style figure + figcaption together for a card-like frame.
Frequently Asked Questions
The figure element represents self-contained content—often an image, diagram, code sample, or quote—that can be referenced as one unit, optionally with a figcaption.
No. A figure can stand alone. When you add a caption, use one figcaption as the first or last child of the figure.
div is a generic container with no meaning. figure marks self-contained content that belongs together and can usually be moved without breaking the main article flow.
No. It only supports global attributes such as class, id, and lang.
Place figcaption as the first or last child of figure. That caption can provide the figure’s accessible name.
Yes. Common uses include illustrations, diagrams, code snippets, poems, and block quotes—anything that forms one self-contained unit.