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