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

Answer key

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

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