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

Answer key

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

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