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

Answer key

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

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