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

Answer key

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

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