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

Answer key

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

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