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

Answer key

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

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