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