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

Answer key

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

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