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

Answer key

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

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