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

Answer key

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

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