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