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

Answer key

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

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