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

Answer key

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

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