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

Answer key

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

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