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