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

Answer key

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

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