Figure Figcaption Semantic Caption
Wrap images with semantic captions using the figure and figcaption elements for accessible content illustration.
Code
<figure>
<img
src="architecture-diagram.svg"
alt="System architecture showing three tiers: presentation, application, and data"
width="800"
height="400"
/>
<figcaption>
Figure 1: Three tier system architecture. The presentation tier
handles HTTP requests, the application tier contains business logic,
and the data tier manages persistence.
</figcaption>
</figure>How the snippet works
The markup uses the semantic elements figure and figcaption instead of generic containers, giving assistive technology and search engines real structure without extra wiring.
Statements that matter
<figcaption>
FAQ
- Why semantic elements instead of divs?
- `<figure>`, `<figcaption>` expose document structure to assistive technology and search engines without ARIA or class-name conventions.
Report a problem with this exampleOpens a pre-filled issue on GitHub.