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

Answer key

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

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