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