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

Answer key

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

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