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

Answer key

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

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