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

Answer key

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

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