Ravenna was the capital of the Western Roman Empire in the 400s, of the Ostrogoth Kingdom in the early 500s, and seat of the Exarchate of Ravenna until 751.
Venice was an independent state for almost a millennium, but it might note have been. It all hinged on a single battle fought in the Venetian lagoon in 810.