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