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