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