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