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

Answer key

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

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