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