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

Answer key

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

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