The innermost layer of the three embryonic germ layers, responsible for forming the linings of the digestive and respiratory tracts, as well as the pancreas, liver, middle ear, thyroid, parathyroid, and thymus glands, among other structures. Also known as endoderm.