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

Answer key

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

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