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