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