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