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

Answer key

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

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