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