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

Answer key

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

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