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