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