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