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