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