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