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