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

Answer key

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

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