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