html · level 2 · unit 4 · lesson 4
- meet it
- guess first
- your turn
- fix it
- nailed it
Tap a green word if you get lost.
meet it
pairs a picture with its <figcaption>.
A figure is something the text points to, like a photo, a chart or a map, with a caption that explains it. Wrap the <img> in <figure>, and put the caption in <figcaption>.
The caption and the alt text do different jobs. Alt text replaces the picture for someone who cannot see it. The caption adds something for everyone, such as who took the photo, or when.
Put <figcaption> first or last inside the figure, never anywhere else.
<figure>
<img src="tree.svg" alt="A tall oak with a rope swing">
<figcaption>The 300-year-old oak in Brook Park.</figcaption>
</figure> Press show my page to see it here.
Browsers indent a figure on both sides, so it stands apart from the text around it.
guess first
What does a screen reader say for the picture?
Guess before you run it. Wrong guesses are how you learn, and nothing is marked.
<figure>
<img src="dog.svg" alt="A spaniel leaping for a frisbee">
<figcaption>Winner of the Best Jump prize, 2026.</figcaption>
</figure>
your turn
Your turn. Caption the cake.
Wrap the picture in a <figure>, then fill the <figcaption> after it with who baked the cake, or when.
Press show my page to see it here.
- the picture is inside a figurenot checked yet
- a caption follows the picturenot checked yet
fix it
The caption is not joined to the picture. Can you fix it?
Press show my page to see it here.
- the caption is inside the figurenot checked yet
- no caption is left outsidenot checked yet
- The caption sits under the picture, but is it part of the figure?
- A
<figcaption>must be inside its<figure>, first or last. - Move
</figure>from line 3 to after the caption, then press run.
nailed it
your pictures come with captions. :D
<figure>wraps a picture the text points to.<figcaption>explains it, for everyone.- Alt text and captions do different jobs.
new words in your collection
- figure
This lesson isn’t saved. A free account remembers every lesson you finish.