How does Sunlight produce vitamin D?

Vitamin D is a group of about 10 fat soluble compounds. The form of vitamin D produced in humans is called vitamin and that in plants is called vitamin . Both vitamin  and can be formed from their respective precursors in the presence of sunlight. In humans, exposure to sunlight leads to secretion of a compound called 7-dehydrocholesterol at the surface of the skin. The ultraviolet rays in sunlight convert 7-dehydrocholesterol into vitamin D by means of a series of chemical reactions. The vitamin D formed at the surface of the skin is reabsorbed into the blood stream.