Emperor Lý Thánh Tông founded it in 1070, and from 1076 to 1779 it housed the Imperial Academy, Quốc Tử Giám, the country's first national university, where future officials studied the Confucian classics for three to seven years on the way to the state examinations. The layout follows the temple at Qufu, the birthplace of Confucius, and the complex appears on the back of the 100,000-đồng banknote.
Four tall pillars stand before the Great Gate, flanked by stelae ordering horsemen to dismount. From the gate three paths run through the grounds: the middle one for the monarch, the left for civil mandarins and the right for military ones. The first two courtyards are calm spaces of old trees and lawns, with bushes clipped into the twelve animals of the zodiac. In the second stands the Khuê Văn pavilion of 1805, a red upper storey with two round windows raised on four whitewashed stone pillars, which has become a symbol of Hanoi.
The third courtyard surrounds the Thiên Quang well, flanked by two great halls that hold the temple's treasures. The doctors' stelae, valuable to historians of Vietnamese education and sculpture, are the other great sight. Emperor Lê Thánh Tông began erecting them in 1484: stone tablets carried on the backs of carved turtles, a symbol of long life and wisdom. Of the 116 he set up, 82 survive, recording the names and home villages of 1307 graduates of 82 royal examinations held between 1442 and 1779. In 2011 UNESCO inscribed the stelae on its Memory of the World Register, and a fence keeps people from rubbing the turtles' heads.
Through the Đại Thành gate, the fourth courtyard forms the ceremonial centre of the temple, with the House of Ceremonies (Đại Bái Đường) and, behind it, the Thượng Điện, where Confucius is worshipped together with his four closest disciples. A small museum shows ink wells, pens, books and belongings of students who studied here. The fifth courtyard, on the site of the old academy, was destroyed in 1946 during the First Indochina War and rebuilt in 2000. The ground floor of its rear building holds exhibits on Confucian education and a statue of Chu Văn An, once rector of the academy, and upstairs honours the three emperors who founded the temple, the academy and the stelae; small towers on either side hold a great drum and a bronze bell cast in 2000.
Just before Tết, the Vietnamese New Year, calligraphers gather outside the temple to write wishes in Chinese characters, which people take home as gifts or decorations.




