Holy Roman Empire
The empire was dissolved on 6 August 1806, when the last Holy Roman Emperor Francis II (from 1804, Emperor Francis I of Austria) abdicated, following a military defeat by the French under Napoleon at Austerlitz (see Treaty of Pressburg). Napoleon reorganized much of the Empire into the Confederation of the Rhine, a French satellite. Francis' House of Habsburg-Lorraine survived the demise of the empire, continuing to reign as Emperors of Austria and Kings of Hungary until the Habsburg empire's final dissolution in 1918 in the aftermath of World War I.
Holy Roman Empire
After Charlemagne died in 814, the imperial crown passed to his son, Louis the Pious. Upon Louis' death in 840, it passed to his son Lothair, who had been his co-ruler. By this point the territory of Charlemagne had been divided into several territories, and over the course of the later ninth century the title of Emperor was disputed by the Carolingian rulers of Western Francia and Eastern Francia, with first the western king (Charles the Bald) and then the eastern (Charles the Fat), who briefly reunited the Empire, attaining the prize. After the death of Charles the Fat in 888, however, the Carolingian Empire broke apart, and was never restored. According to Regino of Prüm, the parts of the realm "spewed forth kinglets", and each part elected a kinglet "from its own bowels". After the death of Charles the Fat, those crowned emperor by the pope controlled only territories in Italy. The last such emperor was Berengar I of Italy, who died in 924.