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

Answer key

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

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