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