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

Answer key

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

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