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