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

Answer key

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

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