Dinosaur habitats varied widely, encompassing lush forests, arid deserts, and coastal regions. During the Mesozoic Era, dinosaurs thrived in environments rich in vegetation, providing ample food sources. Different species adapted to unique surroundings, from the dense jungles of the Late Jurassic to the open plains of the Late Cretaceous, showcasing nature's diversity.