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

Answer key

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

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