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