late Old English cæppe "hood, head-covering, cape," a general Germanic borrowing (compare Old Frisian and Middle Dutch kappe, Old High German chappa) from Late Latin cappa "a cape, hooded cloak" (source of Spanish capa, Old North French cape, French chape), a word of uncertain origin. Possibly a shortened from capitulare "headdress," from Latin caput "head" (from PIE root *kaput- "head").
The Late Latin word apparently originally meant "a woman's head-covering," but the sense was transferred to "hood of a cloak," then to "cloak" itself, though the various senses co-existed. Old English took in two forms of the Late Latin word, one meaning "head-covering," the other "ecclesiastical dress" (see cape (n.1)). In most Romance languages, a diminutive of Late Latin cappa has become the usual word for "head-covering" (such as French chapeau).
The meaning "soft, small, close-fitted head covering" in English is from early 13c., originally for women; extended to men late 14c.; extended to cap-like coverings on the ends of anything (as in hubcap) from mid-15c. The meaning "contraceptive device" is by 1916.
The meaning "cap-shaped piece of copper lined with gunpowder and used to ignite a firearm" is by 1825, hence cap-gun (1855); extended to paper strips used in toy pistols by 1872 (cap-pistol is from 1879).
Figurative thinking cap is from 1839 (considering cap is 1650s). Cap and bells (1781) was the insignia of a fool; cap and gown (1732) of a scholar. To set one's cap at or for (1773) means "use measures to gain the regard or affection of," usually in reference to a woman seeking a man's courtship.
c. 1400, "to put a cap on," from cap (n.); the meaning "cover as with a cap" is from c. 1600. The figurative sense of "complete, consummate, bring to a climax" is from 1580s; that of "go one better, outdo, excel" is by 1821. Related: Capped; capping. To cap verses (1610s) was "to quote alternately verses each beginning with the same letter with which the last ended."
The capping of Latin verses is a common game in classical schools. No verse may be used twice, and no hesitation or delay is permitted; so that a moderate proficiency in the game supposes several thousand verses arranged in the memory alphabetically. [Century Dictionary, 1895]
updated on November 03, 2022