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