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

Answer key

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

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