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

Answer key

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

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