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

Answer key

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

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