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