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