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

Answer key

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

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