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

Answer key

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

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