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

Answer key

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

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