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