The biretta and the beret are etymological twins — the same Late Latin cap that split into the priest's square headgear and the soldier's round one.
A stiff, square cap with three or four ridges on top, worn by Roman Catholic clergy, with colors indicating rank: black for priests, purple for bishops, red for cardinals.
From Italian biretta, from Late Latin birrettum (cap), diminutive of birrus (short hooded cloak), the same root that gives us beret Key roots: birrettum (Late Latin: "cap, small hood"), birrus (Latin (possibly Celtic): "short hooded cloak").
When a new cardinal is created, the Pope personally places a red biretta on his head in a ceremony called the consistory. The red color symbolizes the cardinal's willingness to shed blood for the faith. The biretta's three ridges represent the Trinity in some interpretations, while others say they are simply structural. The biretta and the beret