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