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

Answer key

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

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