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