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