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

Answer key

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

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