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

Answer key

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

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