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