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

Answer key

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

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