Yes, Istanbul was the capital of Turkey in the past, on this time Turkey was known as the Ottoman Empire and it was also the capital of the Byzantine Empire, but in 1923 the establishment of the Turkish Republic was declared and Ankara became its capital.