Majesty

Majesty (abbreviated HM for Her Majesty or His Majesty, oral address Your Majesty; from the Latin "maiestas", meaning "greatness") is used as a manner of address by many monarchs, usually Kings or Queens. Where used, the style outranks the style of "(Imperial/Royal) Highness", but was formerly inferior to the style of "Imperial Majesty". It has cognates in many other languages, especially Indo-European languages of Europe.
Origin.
Originally, during the Roman republic, the word "maiestas" was the legal term for the supreme status and dignity of the state, to be respected above everything else. This was crucially defined by the existence of a specific case, called "laesa maiestas" (in later French and English law, "lèse-majesté"), consisting of the violation of this supreme status. Various acts such as celebrating a party on a day of public mourning, contempt of the various rites of the state and disloyalty in word or act were punished as crimes against the majesty of the republic. However, later, under the Empire, it came to mean an offence against the dignity of the Emperor.
Style of a head of state.
The term was first assumed by Charles V, who believed that—following his election as Holy Roman Emperor in 1519—he deserved a style greater than "Highness", which preceding emperors and kings had used. Soon, Francis I of France and Henry VIII of England followed his example.
After the fall of the Holy Roman Empire, Majesty was used to describe a monarch of the very highest rank— it was generally applied to God. Variations, such as "Catholic Majesty" (Spain) or "Britannic Majesty" (United Kingdom) are often used in diplomatic settings where there otherwise may be ambiguity (see a list).
A person with the title is usually addressed as "Your Majesty", and referred to as "His/Her Majesty", abbreviated "HM"; the plural "Their Majesties" is "TM". Emperors (and empresses) use "[His/Her/Their/Your] Imperial Majesty", "HIM" or "TIM".
Princely and ducal heads usually use "His Highness" or some variation thereof (e.g., "His Serene Highness"). In British practice, heads of princely states in the British Empire were referred to as Highness.
In monarchies that do not follow the European tradition, monarchs may be called "Majesty" whether or not they formally bear the title of "King" or "Queen", as is the case in certain countries and amongst certain peoples in Africa and Asia.
In Europe, the monarchs of Denmark, Norway, Sweden, the United Kingdom, Spain, the Netherlands and Belgium use the style. By contrast, the heads of state of Liechtenstein and Monaco, being principalities, use the inferior styles of "Highness" and "Serene Highness," respectively. Luxembourg, a Grand Duchy, accords its monarch the style of "Highness." In the Holy See, the Pope – while ruling as "Sovereign of the Vatican City State" – uses the spiritual style of "Holiness." Moreover, while Andorra is formally a monarchy, its Co-Princes – the bishop of Urgell (appointed by the Pope) and President of France – use the republican and non-royal style of "Excellency." Andorra is the only non-hereditary, elective and appointive monarchy in Europe. 
In Saudi Arabia, King Fahd abolished the style of "Majesty" in 1975 in favour of "Custodian of the Two Holy Mosques," a style adopted by historical Islamic rulers. However, the King by custom continues to be referred to as "Your Majesty" in conversation.
Great Britain and the Commonwealth.
In the United Kingdom, several derivatives of Majesty have been or are used, either to distinguish the British sovereign from continental kings and queens or as further exalted forms of address for the monarch in official documents or the most formal situations. Richard II, according to Robert Lacey in his book Great Tales from English history, was the first English King to demand the title of "Highness" or "Majesty". He also noted that, '...previous English Kings had been content to be addressed as "My Lord" '.
"Most Gracious Majesty" is used only in the most formal of occasions. Around 1519 King Henry VIII decided Majesty should become the style of the sovereign of England. "Majesty", however, was not used exclusively; it arbitrarily alternated with both "Highness" and "Grace", even in official documents. For example, one legal judgement issued by Henry VIII uses all three indiscriminately; Article 15 begins with, "The Kinges Highness hath ordered," Article 16 with, "The Kinges Majestie" and Article 17 with, "The Kinges Grace." 
Pre-Union Scotland Sovereigns were only addressed as "Your Grace". During the reign of James VI and I, Majesty became the official style, to the exclusion of others. In full, the Sovereign is still referred to as "His (Her) Most Gracious Majesty", actually a merger of both the Scottish Grace and the English Majesty.
"Britannic Majesty" is the style used for the monarch and the crown in diplomacy, the law of nations, and international relations. For example, in the Mandate for Palestine of the League of Nations, it was "His Britannic Majesty" who was designated as the Mandatory for Palestine. Britannic Majesty is famously used in all British passports, where the following sentence is used:
"Most Excellent Majesty" is mainly used in Acts of Parliament, where the phrase "The King's (or Queen's) Most Excellent Majesty" is used in the enacting clause. The standard is as follows:
Ancient China.
In imperial China, the honorific (), referring to the Emperor of China (), was used.
Japan.
In Japan, the honorific () was used when addressing the Reigning Emperor ().
Brunei.
In Brunei, a Malay title for the Sultan of Brunei is officially "Kebawah Duli Yang Maha Mulia Paduka Seri Baginda" (KDYMMPSB) or unofficial simply "Kebawah Duli". It literally means "Under the dust of the Most Exalted [God], The Victorious Sovereign". 
It reflects the title of "Zilullah-fil-Alam" ("Shadow of God on Earth"), referring to the Sultan as having a small bit of God's immense power. The title "paduka" means "victorious" from Old Malay while "seri" is an honorific from Sanskrit. The title "baginda" is a third-person noun for royals and prophets.
Malaysia.
In Malaysia, the Malay style for the Yang di-Pertuan Agong and the Raja Permaisuri Agong is "Kebawah Duli Yang Maha Mulia Seri Paduka Baginda" or simply "Seri Paduka Baginda". The Sultan of Johor and the Permaisuri of Johor use the Malay style "Duli Yang Maha Mulia" (DYMM) which is equivalent to His/Her Majesty since 2017. Prior to that, they were addressed as "His/Her Royal Highness" in English, similar with the other eight royal state Malay rulers in Malaysia.