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

Answer key

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

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