HTML Worksheet: Images and Alt Text
Code tip (File and words): <img src="file.jpg" alt="what it shows" width="200"> — no closing tag. src = which file to load; alt = words describing it; width / height = size in pixels. If the picture fails, the browser shows the alt text; screen readers read it aloud.
NameDateTime takenScore ___ / 40
- 1.True or false: in <img>, width is read by screen readers. (a) False (b) True
-
2.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="cake.jpg" alt="Birthday cake" width="300"> (a) A happy dog (b) width (c) Birthday cake (d) cake.jpg - 3.🖼️ Does <img> need a closing tag? (a) Yes (b) No
-
4.🖼️ Which picture file does the browser load?
<img src="kite.png" alt="A red kite" width="350"> (a) A red kite (b) cake.jpg (c) map.png (d) kite.png -
5.🖼️ Which picture file does the browser load?
<img src="cake.jpg" alt="Birthday cake" width="300"> (a) dog.jpg (b) cake.jpg (c) moon.png (d) Birthday cake - 6.🖼️ Which attribute of <img> shows if the image fails? (a) src (b) height (c) width (d) alt
- 7.🖼️ Which attribute of <img> describes the picture? (a) alt (b) src (c) height (d) width
- 8.🖼️ Which tag puts a picture on a page? (a) <img> (b) <p> (c) <pic> (d) <a>
- 9.True or false: in <img>, alt shows if the image fails. (a) False (b) True
- 10.True or false: in <img>, alt describes the picture. (a) False (b) True
- 11.True or false: in <img>, src shows if the image fails. (a) False (b) True
- 12.True or false: in <img>, src describes the picture. (a) False (b) True
-
13.🖼️ Which picture file does the browser load?
<img src="tiger.jpg" alt="A tiger asleep" width="100"> (a) A tiger asleep (b) kite.png (c) tiger.jpg (d) map.png - 14.🖼️ Which attribute of <img> is read by screen readers? (a) alt (b) height (c) src (d) width
- 15.True or false: in <img>, src names the picture file. (a) True (b) False
-
16.🖼️ How many pixels wide is the picture drawn?
<img src="fort.jpg" alt="An old fort" width="250"> -
17.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="map.png" alt="Map of India" width="100"> (a) Birthday cake (b) map.png (c) width (d) Map of India - 18.🖼️ Why do we add alt text to an image? (a) to load it faster (b) to describe the image (c) to colour it (d) to make it bigger
-
19.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="dog.jpg" alt="A happy dog" width="350"> (a) dog.jpg (b) The full moon (c) width (d) A happy dog -
20.🖼️ Which picture file does the browser load?
<img src="moon.png" alt="The full moon" width="50"> (a) bus.jpg (b) fort.jpg (c) The full moon (d) moon.png -
21.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="fort.jpg" alt="An old fort" width="350"> (a) fort.jpg (b) A tiger asleep (c) width (d) An old fort - 22.True or false: in <img>, alt sets how wide it is. (a) False (b) True
- 23.True or false: in <img>, width sets how tall it is. (a) True (b) False
-
24.🖼️ Which picture file does the browser load?
<img src="moon.png" alt="The full moon" width="250"> (a) fort.jpg (b) The full moon (c) bus.jpg (d) moon.png - 25.True or false: in <img>, height describes the picture. (a) True (b) False
-
26.🖼️ Which picture file does the browser load?
<img src="tiger.jpg" alt="A tiger asleep" width="200"> (a) A tiger asleep (b) map.png (c) kite.png (d) tiger.jpg -
27.🖼️ Which picture file does the browser load?
<img src="cake.jpg" alt="Birthday cake" width="150"> (a) dog.jpg (b) moon.png (c) Birthday cake (d) cake.jpg -
28.🖼️ Which picture file does the browser load?
<img src="cake.jpg" alt="Birthday cake" width="400"> (a) Birthday cake (b) dog.jpg (c) moon.png (d) cake.jpg -
29.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="cake.jpg" alt="Birthday cake" width="200"> (a) cake.jpg (b) width (c) Birthday cake (d) A happy dog -
30.🖼️ How many pixels wide is the picture drawn?
<img src="bus.jpg" alt="Our school bus" width="400"> -
31.🖼️ Which picture file does the browser load?
<img src="kite.png" alt="A red kite" width="300"> (a) kite.png (b) cake.jpg (c) A red kite (d) map.png - 32.🖼️ Which attribute of <img> sets how tall it is? (a) width (b) src (c) height (d) alt
- 33.True or false: in <img>, src sets how wide it is. (a) True (b) False
-
34.🖼️ Which picture file does the browser load?
<img src="cake.jpg" alt="Birthday cake" width="50"> (a) Birthday cake (b) moon.png (c) dog.jpg (d) cake.jpg -
35.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="bus.jpg" alt="Our school bus" width="300"> (a) width (b) bus.jpg (c) An old fort (d) Our school bus -
36.🖼️ How many pixels wide is the picture drawn?
<img src="fort.jpg" alt="An old fort" width="100"> -
37.🖼️ How many pixels wide is the picture drawn?
<img src="map.png" alt="Map of India" width="150"> -
38.🖼️ How many pixels wide is the picture drawn?
<img src="dog.jpg" alt="A happy dog" width="200"> - 39.True or false: in <img>, src tells which image to load. (a) True (b) False
- 40.True or false: in <img>, height is read by screen readers. (a) True (b) False
Answer key
- False
- Birthday cake
- No
- kite.png
- cake.jpg
- alt
- alt
- <img>
- True
- True
- False
- False
- tiger.jpg
- alt
- True
- 250
- Map of India
- to describe the image
- A happy dog
- moon.png
- An old fort
- False
- False
- moon.png
- False
- tiger.jpg
- cake.jpg
- cake.jpg
- Birthday cake
- 400
- kite.png
- height
- False
- cake.jpg
- Our school bus
- 100
- 150
- 200
- True
- False
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids