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