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

Answer key

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

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