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

Answer key

  1. A tiger asleep
  2. tiger.jpg
  3. A happy dog
  4. 250
  5. 350
  6. No
  7. 200
  8. src
  9. alt
  10. height
  11. alt
  12. False
  13. False
  14. A red kite
  15. 400
  16. True
  17. tiger.jpg
  18. kite.png
  19. False
  20. 200
  21. False
  22. True
  23. map.png
  24. False
  25. False
  26. 200
  27. False
  28. Our school bus
  29. False
  30. False
  31. False
  32. alt
  33. moon.png
  34. 300
  35. False
  36. A red kite
  37. True
  38. 300
  39. tiger.jpg
  40. src

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