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

Answer key

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

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