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