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