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

Answer key

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

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