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