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

Answer key

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

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