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

Answer key

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

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