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