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