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