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

Answer key

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

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