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

Answer key

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

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