Imperial and Royal Majesty (His/Her Imperial and Royal Majesty, abbreviated as HI&RM) was the style used by King-Emperors and their consorts as heads of imperial dynasties that were simultaneously royal. The style was used by the Emperor of Austria, who was also the King of Hungary and Bohemia and also by the German Emperor, who was also the King of Prussia. The Austrian and Bohemian monarchies were abolished in 1918 while the vacant throne of Hungary continued to exist until the 1940s.
Franz Joseph I of Austria was further titled "His Imperial and Royal Apostolic Majesty" (Seine Kaiserliche und Königliche Apostolische Majestät) along with his consort Empress Elisabeth, who was styled "Her Imperial and Royal Apostolic Majesty" (Ihre Kaiserliche und Königlich Apostolische Majestät). The plural for the couple was also used as "Their Imperial and Royal Apostolic Majesties" (Ihre Kaiserlichen und Königliche Apostolischen Majestäten).
Although being known as the King-Emperor, Peter I of Brazil was not styled His Imperial and Royal Majesty, neither His Imperial and Royal Highness, when his father, John VI, died, in 1826. His condition as Emperor of Brazil was not compatible with his title as King of Portugal, both in Brazil and Portugal, and when he was confirmed King by the Portuguese Courts, in 1834, being entitled Peter IV of Portugal, he had already abdicated the Brazilian throne in favor of his son, Pedro of Alcântara, Prince Imperial of Brazil.