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