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