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

Answer key

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

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