A codpiece (Middle English language codpece: cod, bag, scrotum (from the Old English language codd, bag) + pece, piece) is a flap or pouch that attaches to the front of the crotch of men's trousers to provide a covering for the genitals. It would be held closed by string ties, buttons, or other methods.