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