Links and media: Figures and captions
figure groups a self-contained image with a figcaption that provides visible context.
Current edit
Understand the pattern
figure groups a self-contained image with a figcaption that provides visible context.
figure groups a self-contained image with a figcaption that provides visible context.
Misconceptions to reject
- A visual appearance alone guarantees the intended HTML meaning.
- Replacing semantic elements with generic divs automatically improves accessibility.
The preview is a sanitized subset, not a full browser compatibility test.
Worked example and expected result
<figure><img src="diagram.png" alt="Requests pass from the gateway to the model" width="640" height="360"><figcaption>Our training application.</figcaption></figure>figure groups a self-contained image with a figcaption that provides visible context.
Explain it
Apply it elsewhere
Keep the momentum.
Complete the lab, then explain and apply the pattern.
Next: Links and media: Responsive image dimensionsTry an incident drillAnonymous lesson and mastery progress lasts for this session. Sign in to keep synced lesson XP between sessions; mastery stays device-local. No speed bonus, lost lives, or hint penalties.
Keep learning
- 01Links and media: Images with useful alt textAlternative text communicates the relevant content of an informative image. Purely decorative images use empty alt text.Practice
- 02Links and media: Responsive image dimensionsIntrinsic width and height let the browser reserve the image aspect ratio before loading the asset.Practice
- 03Links and media: Downloadable resourcesThe download attribute suggests downloading a same-origin resource; meaningful text still identifies the file.Practice