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

Answer key

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

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