Figure and Figcaption
<figure> groups self-contained content such as an image, diagram, chart, or code example. <figcaption> provides a caption for the figure.
Figure Caption
<figure>\n <img src="architecture.png" alt="Three-tier web architecture">\n <figcaption>Figure 1: A typical three-tier web application.</figcaption>\n</figure>💡 The figure groups the visual and its caption into a meaningful unit.
Key Takeaways
- Use figure for self-contained illustrative content.
- Use figcaption for its associated caption.
Knowledge Check
Which element provides a caption for a figure?