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