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