What is the main habitat of a turtle?

They mostly live in the marine life.But sometimes thy come to land for laying their eggs.