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

Answer key

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

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