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

Answer key

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

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