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

Answer key

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

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