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

Answer key

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

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