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