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

Answer key

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

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