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

Answer key

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

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