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