Put an image inside a figure.
Acceptance criteria
- 1.Put an image inside a figure.
HTML Tutorial · HTML Tags
These 10 tasks go with the HTML <figure> Tag chapter. 5 of them ask you to build something small from scratch; 5 give you code that is already broken and ask you to work out why. Set aside about 90 minutes for the whole set, though you can do them in any order.
Nothing here is marked by a person. When you press Submit, the editor checks your code against the points listed under each task and tells you straight away what passed and what didn't (you need a free account to submit). If you get stuck, there are hints, and a worked solution once you've had a go. The first 2 tasks are free; the rest are part of the practice plan.
If it's been a while since you read the chapter, here is how it starts: “The tag in HTML is used to group self-contained media content like images, illustrations, diagrams, code snippets, or videos — usually accompanied by a caption. It helps semantically associate media with its description, making web content more meaningful and accessible.” .
1.Wrap an imageexercise · easy · 10 min
Put an image inside a figure.
Passes when: Put an image inside a figure.
2.Caption the figureexercise · easy · 10 min · practice plan
Add a caption below the image.
Passes when: Add a caption below the image.
3.A code figureexercise · easy · 10 min · practice plan
Put a code block in a captioned figure.
Passes when: Put a code block in a captioned figure.
4.A quoted figureexercise · easy · 10 min · practice plan
Put a blockquote in a figure with its source as the caption.
Passes when: Put a blockquote in a figure with its source as the caption.
5.Two figuresexercise · medium · 10 min · practice plan
Add two captioned figures.
Passes when: Add two captioned figures.
6.Fix the div wrapping the imagebug fix · easy · 8 min
Self-contained content belongs in a figure.
Passes when: Self-contained content belongs in a figure.
7.Fix the caption written as a paragraphbug fix · easy · 8 min · practice plan
A figure's caption is a figcaption.
Passes when: A figure's caption is a figcaption.
8.Fix the caption outside the figurebug fix · easy · 8 min · practice plan
The caption belongs with the content it describes.
Passes when: The caption belongs with the content it describes.
9.Fix the attribution inside the quotebug fix · easy · 8 min · practice plan
The source is the caption, not part of the quotation.
Passes when: The source is the caption, not part of the quotation.
10.Fix the missing second figurebug fix · easy · 8 min · practice plan
Only one of the two images was written up.
Passes when: Only one of the two images was written up.
Between them these tasks cover Self-contained content, Captions and Grouping.
Looking for a different chapter? See every practice set, or switch to the interview theory questions.