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