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

Answer key

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

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