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

Answer key

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

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