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

Answer key

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

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