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