c. 1300, "restrain (someone), control (oneself), behave (in a certain way)," from Old French contein-, tonic stem of contenir, from Latin continere (transitive) "to hold together, enclose," from assimilated form of com "with, together" (see con-) + tenere "to hold," from PIE root *ten- "to stretch."
From mid-14c. as "to have (something) as a constituent part;" from late 14c. as "have something inside, enclose." Related: Contained; containing; containable.
"to confine or enclose in a pen," c. 1200, pennen, from Old English *pennian (only in compounds), from the source of pen (n.2). Related: Penned; penning.
"to make a ditch," Old English dician "make a ditch, surround with a ditch or dike, enclose with a dike or ditches," from the source of dike (n.). Related: Diked; diking.