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