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

Answer key

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

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