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

Answer key

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

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