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

Answer key

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

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