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

Answer key

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

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