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