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