Emperor
The first Austrian Emperor was the last Holy Roman Emperor Francis II. In the face of aggressions by Napoleon, Francis feared for the future of the Holy Roman Empire. He wished to maintain his and his family's Imperial status in the event that the Holy Roman Empire should be dissolved, as it indeed was in 1806 when an Austrian-led army suffered a humiliating defeat at the Battle of Austerlitz. After which, the victorious Napoleon proceeded to dismantle the old "Reich" by severing a good portion from the empire and turning it into a separate Confederation of the Rhine. With the size of his imperial realm significantly reduced, Francis II, "Holy Roman Emperor" became Francis I, "Emperor of Austria". The new imperial title may have sounded less prestigious than the old one, but Francis' dynasty continued to rule from Austria and a Habsburg monarch was still an emperor ("Kaiser"), and not just merely a king ("König"), in name.
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".