Mrkunlex
The Holy Roman Emperor (historically Romanorum Imperator, "Emperor of the Romans") was the ruler of the Holy Roman Empire (800/962-1806 AD, from Charlemagne/Otto I to Francis II). The title was, almost without interruption, held in conjunction with the rule of the Kingdom of Germany.
From an autocracy in Carolingian times the title evolved into an elected monarchy chosen by the prince-electors. The Holy Roman Emperor was widely perceived to rule by divine right by Roman Catholic rulers in Europe, and he often contradicted or rivaled the Pope, most notably during the Investiture controversy. In theory, the Holy Roman Emperor was primus inter pares (first among equals) among other Catholic monarchs. In practice, a Holy Roman Emperor was only as strong as his army and alliances, including marriage alliances, made him.
There was never a Holy Roman Empress regnant, though women such as Theophanu and Maria Theresa of Austria served as de facto Empresses regnant.
Even after the Reformation, the elected Emperor always happened to be a Roman Catholic. Until the Reformation, the Emperor elect (imperator electus) was required to be crowned by the Pope before assuming the imperial title. Charles V, Holy Roman Emperor was the last to be crowned by the Pope in 1530. There were short periods in history when the electoral college was dominated by Protestants, although religion by no means defined the vote and the electors usually voted in their own political interest. Various royal houses of Europe, at different times, became hereditary holders of the title. In particular, the Habsburgs kept the longest possession of the title. The Holy Roman Empire was dissolved by Francis II, Holy Roman Emperor as a result of the collapse of the polity during the Napoleonic wars.
Source:
https://en.m.wikipedia.org/wiki/Holy_Roman_Emperor