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

Answer key

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

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