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