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