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

Answer key

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

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