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

Answer key

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

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