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

Answer key

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

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