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