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

Answer key

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

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