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

Answer key

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

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