To quote Wikipedia: "The use of coloured and patterned neckties indicating the wearer's membership in a club, military regiment, school, et cetera, dates only from late-nineteenth century England. The first definite occurrence was in 1880, when Exeter College, Oxford rowers took the College-colour ribbons from their straw boaters and wore them as neckties (knotted four-in-hand), and then went on to order a proper set…
Cravattes are much older than that. Croatian mercenaries used by Louis (I think XV) used to wear red garments around their necks. The mercenaries had a reputation as being fantastic soldiers, and French men copied the military trend with what they called a 'Cravatte' derived from 'Croat'.
(My girlfriend's in the fashion industry - she works at an Australian lingerie label now but used to work at Aqua Scutum)