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