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