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

Answer key

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

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