Vitamin D is a fat-soluble vitamin, which can be of five types - vitamin D1, D2, D3, D4, and D5. Vitamin D2 or ergocalciferol, and vitamin D3 or cholecalciferol are the two major forms of vitamin D. Vitamin D2 is produced by the invertebrates, like fungus and plants in the presence of ultraviolet radiation of the sunlight, while vitamin D3 is produced in the skin of the vertebrates in response to ultraviolet B light of the sun.