Campaign cords or campaign hat cords are decorations generally worn around a variety of types of serviceman's hats to indicate station, unit, rank or history of service.
While mainly ornamental and not serving any practical purpose, they could indicate information about the wearer.
Historically, they have been worn by the US military from the mid 19th century in the Indian campaigns, World War I, World War II to a lesser degree in the Pacific Theatre, and by air cavalry in Vietnam.
The colour of the cords could be indicative of the branch of the unit the wearer was with, and also denote rank.
[i] States that do not wear campaign cords atop their hats include Delaware, Maryland, Missouri, New Jersey, New Mexico, New York, North Dakota, Pennsylvania, Rhode Island, Texas, and West Virginia.