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

Answer key

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

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