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

Answer key

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

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