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

Answer key

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

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