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