The Han dynasty (202 BCE – 220 CE) was a period of Imperial China divided into the Western Han (202 BCE – 9 CE) and Eastern Han (25–220 CE) periods, when the capital cities were located at Chang'an and Luoyang, respectively. It was founded by Emperor Gaozu of Han and briefly interrupted by the regime of Wang Mang (r. 9–23 CE) who usurped the throne from a child Han emperor.
The Han dynasty was an age of great economic, technological, cultural, and social progress in China. Its society was governed by an emperor who shared power with an official bureaucracy and semi-feudal nobility. Its laws, customs, literature, and education were largely guided by the philosophy and ethical system of Confucianism, yet the influence of Legalism and Daoism (from the previous Zhou dynasty) could still be seen. Members of the scholarly-gentry class who aspired to hold public office were required to receive a Confucian-based education. A new synthetic ideology of Han Confucianism was created when the scholar Dong Zhongshu (179–104 BCE) united the Confucian canon allegedly edited by Kongzi, or Confucius (551–479 BCE), with cosmological cycles of yin and yang and the Chinese five elements.