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