The name of the city comes from the Venetia region, and that – from the Veneti tribe who lived here in Roman times. However, under the Romans, there was no urban settlement in the lagoon. People began to settle in the Venetian lagoon after the invasions of the barbarians – the Visigoths, Attila’s Huns and the Lombards – who passed here in the 5th-6th centuries and devastated cities on the continent, the most significant of which was Aquileia. Urban settlement on the islands of the Venetian lagoon began to be created in the second half of the 6th century [4]. Initially, the center of the settlement was on the islands of Malamocco and Torcello, but from the 8th century it began to move to its present position. In the 7th century, the islands, on the initiative of Byzantium, to which they formally belonged, were united under the rule of a single ruler – the Doge. The first doge, Paolo Lucio Anafesto, was elected in 697, for which there is no documentary evidence, and replaced the Byzantine Magister militum, who ruled the entire province [5]. From the middle of the 8th century, the Doge was elected in Venice; it did not have to be approved by the Byzantine emperor. The first confirmed election of the Doge took place in 727; in the entire history of the city, 120 doges were elected. The latter, Ludovico Manin, abdicated in 1797.
After the occupation (751) by the Lombards of Ravenna, Venice remained the last territory in Italy formally under the control of Byzantium. After the inclusion of the rest of Italy in the empire of Charlemagne, it actually remained a link connecting Byzantium and the Western world, which contributed to the rapid growth of Venice as a trading city. In the 9th century, this growth was restrained by the danger of an invasion by the Hungarians, Slavs or Arabs (in 975 the Muslim fleet reached the city of Grado). During the reign of Doge Pietro II Orseolo (991-1009), Venice managed to conclude treaties with all the surrounding powers, ensuring the independence of the city and unhindered trade, as well as begin the territorial expansion of the republic, seizing territories in Dalmatia.
In 828, the relics of St. Mark, stolen in Alexandria, were transferred to Venice and placed in a specially built cathedral. By the end of the 9th century, Venice had acquired the structure, with islands and canals, which it retains to this day. To protect against a possible Hungarian invasion, a defensive system with walls and a chain was built to block the entrance to the Grand Canal [6].
Since the founding of the city, Venice has never had vassal relations between the citizens of the republic. In this sense, it was a state formation unique in medieval Europe. When Doge Pietro IV Candiano tried to pursue a policy of greater involvement of Venice in internal Italian affairs, the fear of the gradual introduction of vassalage caused an uprising in 976, as a result of which the Doge was killed [7]. Around 1040, a statute was passed prohibiting anyone during the life of the Doge to appoint him a co-ruler or successor