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

Answer key

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

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