how did knights follow the code of chivalry
Chivalry The code of chivalry that developed in medieval Europe had its roots in earlier centuries. It arose in the Holy Roman Empire from the idealisation of the cavalryman—involving military bravery, individual training, and service to others—especially in Francia, among horse soldiers in Charlemagne's cavalry.[2][3] The term chivalry derives from the Old French term chevalerie, which can be translated to "horse soldiery".[Note 1] Gautier states that knighthood emerged from the Moors (Muslims) as well as the Teutonic forests and was nurtured into civilization and chivalry by the Catholic Church.[5]