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

Answer key

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

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