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