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