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

Answer key

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

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