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

Answer key

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

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