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