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

Answer key

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

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