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

Answer key

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

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