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

Answer key

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

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