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