The temple was founded and first built in 1070 at the time of Emperor Lý Thánh Tông, and it hosted the Imperial Academy (Quốc Tử Giám, 國子監), Vietnam's first national university, from 1076 to 1779.
Just before the Tết Vietnamese New Year celebration, calligraphists will assemble outside the temple and write wishes in Chữ Hán.
For nearly two centuries, despite wars and disasters, the temple has preserved ancient architectural styles of many dynasties as well as precious relics.
The academy at the Hanoi temple lost its prominence and became a school of the Hoài Đức District.
Under the French protectorate, the Văn Miếu - Quốc Tử Giám was registered as a Monument historique in 1906.
Campaigns of restoration were pursued in 1920 and 1947 under the responsibility of École française d'Extrême-Orient (French School of the Far East).
It covers an area of over 54,000 square metres (580,000 sq ft), including the Văn lake, Giám park and the interior courtyards which are surrounded by a brick wall.
On either side of the pillars are two stelae commanding horsemen to dismount.The gate opens onto three pathways which continues through the complex.
The first two courtyards are quiet areas with ancient trees and trimmed lawns, where scholars would relax away from the bustle of the outside world.
The bell located above the main gate was used to signify that an important person was coming through and was added to the Văn Miếu in the 19th century.
It features the Khuê Văn pavilion (奎文閣), a unique architectural work built in 1805 and a symbol of present-day Hanoi.
He erected 116 steles of carved blue stone turtles with elaborate motifs to honour talent and encourage study.
The Turtle (Quy, 龜) is one of the nation's four holy creatures - the others are the Dragon (Long, 龍), the Unicorn (Lân, 麟) and the Phoenix (Phượng, 鳳).
The doctors' steles are a valuable historical resource for the study of culture, education and sculpture in Vietnam.
[7] The ancient Chinese engravings on each stele praise the merits of the monarch and cite the reason for holding royal exams.
They are a valuable historical resource for the study of philosophy history, culture, education, society and sculpture in Vietnam.
Their original purpose was to house altars to the seventy-two most honoured disciples of Confucius and Chu Văn An (a rector of the Imperial Academy).
The next building is the Thượng Điện, where Confucius and his four closest disciples Yanhui, Zengshen, Zisi and Mencius are worshipped.
A small museum displays ink wells, pens, books and personal artefacts belonging to some of the students that studied at the temple.
This development included the Minh Luân house, west and east classrooms, a storehouse for wooden printing blocks and two sets of three 25 room dormitories.
At this exam, the monarch himself posed the questions, responded to the candidate's answer and then ranked those who passed into different grades.