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

Answer key

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

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