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

Answer key

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

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