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