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

Answer key

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

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