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

Answer key

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

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