HTML and CSS Reference
Figure 9.15 A self-contained image placed within a <figure> element
To add a caption or legend to the <figure> element, the <figcaption> element is
used. The <figcaption> may appear at the top of, bottom of, or anywhere within the
<figure> element; however, it may only appear once. When it's used, the <figcap-
tion> element will serve as the caption for all content within the <figure> element.
Additionally, the <figcaption> element may replace an <img> element's alt attrib-
ute if the content of the <figcaption> element provides a useful description of the visu-
al content of the image.
2. <img src="dog.jpg">
3. <figcaption>A beautiful black, brown, and white hound dog wearing