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

Answer key

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

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