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

Answer key

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

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