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

Answer key

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

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