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

Answer key

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

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