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

Answer key

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

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