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

Answer key

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

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