figcaptionelement
figcaption is an HTML element used to provide a caption for content contained within a figure element. It is designed to describe the figure as a whole, not only the embedded media, and is commonly paired with images, illustrations, diagrams, or other media inside a figure.
Usage and placement: The figcaption must be a child of the figure element and may appear as
Content model and semantics: The content inside a figcaption is phrasing content, meaning it supports inline
Accessibility considerations: The figcaption enhances accessibility by providing a textual description that can be read in
Styling and compatibility: Default styling is browser-dependent, with captions typically appearing near the figure. Authors control
<img src="landscape.jpg" alt="A mountain landscape at sunset">
<figcaption>Sunset over a mountain landscape.</figcaption>
<figcaption>Map of Europe with cities labeled.</figcaption>