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