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

Answer key

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

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