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

Answer key

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

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