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