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