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