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.
Roman emperor
This line of Roman emperors was actually generally Germanic rather than Roman, but maintained their Roman-ness as a matter of principle. These emperors used a variety of titles (most frequently ""Imperator Augustus"") before finally settling on "Imperator Romanus Electus" ("Elected Roman Emperor"). Historians customarily assign them the title "Holy Roman Emperor", which has a basis in actual historical usage, and treat their "Holy Roman Empire" as a separate institution. To Latin Catholics of the time, the Pope was the temporal authority as well as spiritual authority, and as Bishop of Rome he was recognized as having the power to anoint or crown a new Roman emperor. The last man to be crowned by the pope (although in Bologna, not Rome) was Charles V. All his successors bore only a title of "Elected Roman Emperor".