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

Answer key

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

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