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

Answer key

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

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