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

Answer key

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

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