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