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