JJ, "A history of fear
In the 5th century, people fled their homes to avoid barbarian conquerors. A marshy lagoon was located just off the mainland and protected from the barbarians who would not cross the water. As invasions continued across Italy more and more people fled until eventually, they realised there was a need for a new city.
Building the city
Building a city on a marshland, however, wasn’t going to be easy. They needed more space and better foundations to build on. To largen the marsh islands they were taking refuge on, they began to dig canals and used wooden planks to shore the banks. They used a similar wooden plant technique to create foundations for their buildings.
The settlers hammered thousands of wooden piles into the mud, each one touching the next until they cut the tops off to reveal a solid wooden platform. These platforms are still below many of the buildings you see today."
https://www.venicetoursitaly.it/blog/why-was-venice-built-on-water/