 The epidermis of the skin originates from the less dorsal ectoderm which surrounds the neuroectoderm at the early gastrula stage of embryonic development.The position of the ectoderm relative to the other germ layers of the embryo is governed by "selective affinity", meaning that the inner surface of the ectoderm has a strong (positive) affinity for the mesoderm, and a weak (negative) affinity for the endoderm layer.This selective affinity changes during different stages of development.