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

Answer key

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

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