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