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

Answer key

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

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