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

Answer key

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

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