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

Answer key

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

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