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

Answer key

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

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