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