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

Answer key

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

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