The Roman Empire was established when Julius Caesar become emperor in 27 B.C. and lasted all the way up until A.D. 476, when the Roman empire fell. In the mid-900s A.D., when Otto 1 (912-73) seized control of most of northern and central Italy. Otto was crowned emperor by Pope John XII in 962 and by the 1200s, the Italian peninsula officially became known as the Holy Roman Empire. The Holy Roman empire ended on the 12th of July, 1806 after the confederation of the Rhine. So basically the Holy Roman Empire was technically the German Empire.
The confederation of the Rhine and its influence in the end of the Holy Roman Empire
The confederation of the Rhine brought most of the German states under French domination and then precipitated to a war with Prussia.