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

Answer key

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

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