CodeZettaInterview Hub

HTML · Semantics · Senior · Concept

What is the role of <figure> and <figcaption>?

Short Interview Answer

Associate media with a caption as a single unit.

Detailed Explanation

Useful for images, diagrams, code samples. Caption can be before/after media. Improves semantics vs orphaned text under an image.

Did you know this answer?