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

Answer key

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

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