What is the main habitat of a seahorse?

Seahorses are a kind of fish (Hippocampus) that likes shallow tropical and temperate waters all over the world. They don't swim well, so they like living in sheltered areas with lots of seaweed and grasses. They also like coral reefs and mangroves. They can change their colors to blend in or to attract other seahorses. They are closely related to pipefish and leafy sea dragons.