Add an image pointing at the sample star.
Acceptance criteria
- 1.Add an image pointing at the sample star.
HTML Tutorial · HTML Tags
These 10 tasks go with the HTML <img> 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 embed images into a webpage. It is an empty tag (no closing tag) and requires attributes like src (source URL of the image) and alt (alternative text for accessibility and SEO).” .
1.Show an imageexercise · easy · 10 min
Add an image pointing at the sample star.
Passes when: Add an image pointing at the sample star.
2.Describe the imageexercise · easy · 10 min · practice plan
Give the image useful alternative text.
Passes when: Give the image useful alternative text.
3.Set the sizeexercise · easy · 10 min · practice plan
Give the image an explicit width and height.
Passes when: Give the image an explicit width and height.
4.A decorative imageexercise · easy · 10 min · practice plan
Mark a purely decorative image with empty alt text.
Passes when: Mark a purely decorative image with empty alt text.
5.Lazy-load an imageexercise · medium · 10 min · practice plan
Let the browser defer loading until it is needed.
Passes when: Let the browser defer loading until it is needed.
6.Fix the wrong attribute for the filebug fix · easy · 8 min
Images point at their file with src.
Passes when: Images point at their file with src.
7.Fix the missing alt textbug fix · easy · 8 min · practice plan
An image with no alt is invisible to a screen reader.
Passes when: An image with no alt is invisible to a screen reader.
8.Fix the size set with a stylebug fix · easy · 8 min · practice plan
Give the image real width and height attributes.
Passes when: Give the image real width and height attributes.
9.Fix the alt describing the filebug fix · easy · 8 min · practice plan
Alt text describes the picture, not the filename.
Passes when: Alt text describes the picture, not the filename.
10.Fix the wrong value for lazy loadingbug fix · easy · 8 min · practice plan
Deferred loading uses loading="lazy".
Passes when: Deferred loading uses loading="lazy".
Between them these tasks cover Images, alt text and Dimensions.
Looking for a different chapter? See every practice set, or switch to the interview theory questions.