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

Answer key

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

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