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