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