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

Answer key

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

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