Han Wudi was conventionally regarded as the first emperor to declare a nian hao; however he was only the first to use a nian hao in every year of his reign. His grandfather and father also employed nian hao, though not continuously. Han Wudi changed period title every five years or so, going through a total of eleven reigning slogans during his reign from 140 BC to 87 BC.
Each nian hao has a literary meaning. For instance, the first nian hao of Han Wudi was Jianyuan (建元 in pinyin: jian4 yuan2), literally meaning "establishing the First". It also reflected charateristics of political and other landscapes at the time. Jianzhongjingguo (建中靖國 jian4 zhong1 jing4 guo2) means "establishing a happy medium and cleansing the country", reflecting Song Huizong's attempt to moderate the rivalry among the conservative and progressive parties on political and social reformation.
The process of nian hao declaration was referred to in traditional Chinese history texts as jianyuan, named after Han Wudi's first era name. Declaring a new nian hao to replace an old one during an emperor's reign was referred to as gaiyuan (改元 gai3 yuan2), literally meaning "reset the First".
To name a year using an era name only requires counting how many years the year in question is after the first year of the era. For example 138 BC was the third year of Jianyuan (建元), since 140 BC was the first year. When more than one monarch use the same motto, the name of specific monarch or dynasty has to be mentioned. For instance both Han Wudi and Jin Kangdi picked Jianyuan as their motto. Thus 344 AD was the second year of Jianyuan of the Jin Dynasty (or of Jin Kangdi) whereas 139 BC was the second year of Jianyuan of the Han Dynasty (or of Han Wudi).
Before the Republic of China was established, only the emperor could declare a nian hao, which was supposed to be unique in the country; hence it was a symbol of imperial power. Whoever dared to declare a new nian hao when one is in use was regarded as challenging to the current emperor. This happened countless times throughout the history of China; the existence of numerous nian hao at a time often reflected political unrest. In addition, using a particular nian hao was a political act implying recognition of a sovereign's right to rule, and one issue that traditional Chinese historians faced was which set of nian hao to use when dating a historical event.
Almost all era names have exactly two characterss. Notable exceptions are from the non-Han Chinese Western Xia Dynasty (1032 - 1227). Of the 33 Western Xia era names, seven have more than three characters. For example,
Emperors from the Tang Dynasty up to but not including the Ming Dynasty are better identified by their unique miao hao (廟號), or "temple names." Ming Dynasty and Qing Dynasty emperors are known by their era names, because during these two dynasties the practice was to choose only one motto for the whole reign.
A fuller description of this naming convention is given in the Chinese sovereign entry.
Nian hao were also employed (under different naming convention) in other East Asian countries such as Korea, Japan and Vietnam, mostly because of China's cultural influence. They are still used in Japan. In addition Taiwan occasionally uses an era name of Minguo (i.e. the Republic), which can be regarded as a nian hao.
See also: Chinese calendar