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