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

Answer key

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

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