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