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