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