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

Answer key

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

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