Figure and Figcaption
The <figure> element is a self-contained piece of content that is referenced from the main flow — typically an image, diagram, code listing, or chart. It can be moved to an appendix without affecting the flow of the document.
Figcaption
The optional <figcaption> element provides a caption for the <figure>. It must be the first or last child of the <figure> element. Using <figure>/<figcaption> instead of an <img> with a nearby <p> programmatically associates the caption with the image — a significant accessibility improvement. This pairing is also used for code blocks with explanatory captions.