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