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

Answer key

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

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