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

Answer key

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

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