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

Answer key

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

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