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