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