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

Answer key

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

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