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

Answer key

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

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