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