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

Answer key

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

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