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