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

Answer key

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

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