The integumentary system consists of the skin and its appendages. It functions to protect the body, regulate temperature, synthesize vitamin D, and detect sensory stimuli. The skin is composed of two layers - the epidermis and dermis. The epidermis contains keratinocytes that help protect the body, while the dermis contains blood vessels, nerves, hair follicles, and glands. Other structures include hair, nails, sweat and sebaceous glands, fascia, and ligaments.