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

Answer key

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

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