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

Answer key

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

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