The Flag of the Holy Roman Empire (HRE) was an imperial banner used by the Holy Roman Emperor; black and gold were used as the colours of the imperial banner, a black eagle on a golden background. After the late 13th or early 14th century, the claws and beak of the eagle were coloured red. From the early 15th century, a double-headed eagle was used.
In 1804, Napoleon Bonaparte declared the First French Empire. In response to this, Emperor Francis II of the Habsburg dynasty declared his personal domain to be the Austrian Empire and became Francis I of Austria. Taking the colors of the banner of the Holy Roman Emperor, the flag of the Austrian Empire was black and gold. Francis II was the last Holy Roman Emperor, with Napoleon forcing the empire’s dissolution in 1806. After this point, these colours continued to be used as the flag of Austria until 1918.