HTML and CSS Reference
In-Depth Information
Figure 9.15 A self-contained image placed within a <figure> element
Figure Caption
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.
Click here to view code image
1. <figure>
2. <img src="dog.jpg">
3. <figcaption>A beautiful black, brown, and white hound dog wearing
a kerchief.</figcaption>
4. </figure>
Search WWH ::

Custom Search