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

Answer key

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

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