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