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