The Medieval concept known as ''Courtly Love'' is often used (in Modern terms) as a form of ''erotic'' convention between consenting adults in The Middle Ages. In reality, it was an off-shoot of Knightly Code, between a Noble Warrior and a Female in which He could not attain, due to either being His ''Queen'' or other ''high born'' Lady. Courtly Love was seen as form of ''attraction'' coupled with performing feats of heroism (quests), to attract such a Lady's ''admiration''. Even if the ''attraction'' was mutual, neither side would (or even could) – act upon it. In it's original form, Courtly Love was a literary form (written for Nobility), which gave them stories of ''heroic Knights'' either fighting for and attaining fame in ''the name of a Noble Lady'' The earliest example dates to the 12th century AD and France. These stories actually shaped the concept of Courtly Love.
Meshed heavily with religious dogma at times, the most well known example appears in The Arthurian Legends, in particular between Sir Lancelot and King Arthur's Queen Guinevere. But unlike the traditional example of Courtly Love (and to make the tale more ''forbidden''), Lancelot and Guinevere enter into a ''relationship'' (with bad results for The King and Camelot). Courtly Love had Rules. Examples being that ''Jealousy'' was seen as necessary to real Love. So too, Marriage was not seen as an ''impediment'' to Love (as many such were arranged for political reasons). Of course, Acts of Valor and Heroism were seen as the primary means to attract a Lady's attention (which was attested to by The Lady issuing a ''long glance'' to Her ''Paramour''). These rules (and others), were but the surface of how Courtly Love was viewed and acted upon. It was similar was slightly different depending on the Country it was being practiced it.
While much of Courtly Love would end by the 17th Century (in it's original form), it would form the backbone of how a Gentleman was supposed to behave to and around Ladies (especially among the Wealthy Class). Such ideology was emulated by the poorer Class as well, but without much refinery. By the 19th Century and the revival of Medieval Art and Culture in Europe, the ideas of Courtly Love would again come to light.