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