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