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

Answer key

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

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