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

Answer key

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

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