Overview
The Holy Roman Empire was in theory an elective monarchy, but from the 15th century onwards the electors often merely formalised what was a dynastic succession within the Austrian House of Habsburg, with the title usually passing to the eldest surviving son of the deceased Emperor. Despite this, the office was not legally hereditary, and the heir could not title himself "Emperor" without having been personally elected.
Formally the Prince-Electors elected a King of the Romans, who was elected in Germany but became Holy Roman Emperor only when crowned by the Pope. Charles V was the last to be a crowned Emperor (elected 1519, crowned 1530); his successors were all Emperors by election (German: erwählter Römischer Kaiser; Latin: electus Romanorum imperator) only.
Electors were among the princes of the Empire, but they had exclusive privileges in addition to their electoral ones which were not shared with the other princes. The dignity of Elector was extremely prestigious, and was held in addition to such feudal titles as Duke, Margrave, or Count Palatine.
At least from the 13th century, there were seven electors: three spiritual (the Archbishop of Mainz, the Archbishop of Trier, and the Archbishop of Cologne) and four lay: (the King of Bohemia, the Count Palatine of the Rhine, the Duke of Saxony, and the Margrave of Brandenburg; these last three were also known as the Elector Palatine, the Elector of Saxony, and the Elector of Brandenburg, respectively). Only six of the electors, however, had the right to sit at ordinary meetings: "The King of Bohemia, who was in fact not a prince of the Empire but a neighbouring and independent monarch, might vote at an imperial election, but was allowed on no other occasion to meddle in the affairs of the Empire."
Other electors were added in the 17th century, including the Duke of Bavaria (referred to as the Elector of Bavaria—replacing the Count Palatine of the Rhine, who was of the same family but had lost his title and vote temporarily during the Thirty Years' War), and the Duke of Brunswick-Lüneburg (the Elector of Hanover - an office subsequently held by three Hanoverian kings of Great Britain, George I, George II, and George III).
Several new electors were created during the reorganization of the Empire in 1803, but these never participated in an election. On August 6, 1806, pressed both by Napoleon and by several German princes (including some Electors), the last Holy Roman emperor, Emperor Francis II, by edict dissolved the Empire. After or just before the dissolution, the Electors of Bavaria, Württemberg, Saxony, and Hanover each took the title of king of his former electorate (in the case of Hanover after regaining his lands following Napoleon's defeat in 1814) while the King of Prussia extended his royal title to cover his erstwhile Electorate of Brandenburg as well as the lands he held as king outside the imperial border. The Electors of Regensburg (who had succeeded to the Mainz vote), Würzburg (who had succeeded to the Salzburg vote), and Baden (a new electorate) became grand dukes. The Elector of Hesse and Landgrave of Hesse-Kassel chose to retain the defunct electoral title until the state was annexed by Prussia, 60 years later.
Read more about this topic: Prince-elector