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