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

Answer key

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

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