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