← Images with img, src and alt lesson New set →

HTML Worksheet: Images and Alt Text

HTML and CSS lesson 7: Images with img, src and alt · Set 556 · 40 questions
TalentJR

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

Answer key

  1. 350
  2. 50
  3. 100
  4. <img>
  5. 300
  6. False
  7. 250
  8. alt
  9. 300
  10. to describe the image
  11. 300
  12. kite.png
  13. True
  14. tiger.jpg
  15. A tiger asleep
  16. The full moon
  17. 250
  18. An old fort
  19. An old fort
  20. False
  21. alt
  22. kite.png
  23. True
  24. True
  25. Map of India
  26. True
  27. No
  28. Our school bus
  29. False
  30. src
  31. Map of India
  32. bus.jpg
  33. cake.jpg
  34. width
  35. Birthday cake
  36. False
  37. Birthday cake
  38. The full moon
  39. map.png
  40. The full moon

Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids