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