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