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