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

Answer key

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

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