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

Answer key

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

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