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

Answer key

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

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