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