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