from Wikipedia Tainan:
"Tainan" redirects here; for the county of the same name see Tainan County.
Tainan City (traditional Chinese: 臺南/台南; simplified Chinese: 台南; pinyin: Táinán; Wade-Giles: T'ai-nan; Pe̍h-ōe-jī: Tâi-lâm, literally "Southern Taiwan") is the fourth largest city in Taiwan after Taipei, Kaohsiung, and Taichung. It is officially administrated as a provincial city of Taiwan Province in the Republic of China.
Tainan was established as the capital of Taiwan in 1661 and remained the capital until 1887 during the Qing Dynasty. In fact, "Tayoan"/"Tayouan" is the old name of Tainan and became the name of the island later. The city is famous for its abundant historical buildings and relics.