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

Answer key

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

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