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

Answer key

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

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