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

Answer key

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

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