Yokohama's population of 3.7 million makes it Japan's largest city after the Special Wards of Tokyo. Yokohama developed rapidly as Japan's prominent port city following the end of Japan's relative isolation in the mid-19th century, and is today one of its major ports along with Kobe, Osaka, Nagoya, Hakata, Tokyo, and Chiba. 

Yokohama was a small fishing village up to the end of the feudal Edo period, when Japan held a policy of national seclusion, having little contact with foreigners. A major turning point in Japanese history happened in 1853–54, when Commodore Matthew Perry arrived just south of Yokohama with a fleet of American warships, demanding that Japan open several ports for commerce, and the Tokugawa shogunate agreed by signing the Treaty of Peace and Amity. 

It was initially agreed that one of the ports to be opened to foreign ships would be the bustling town of Kanagawa-juku (in what is now Kanagawa Ward) on the Tōkaidō, a strategic highway that linked Edo to Kyoto and Osaka. However, the Tokugawa shogunate decided that Kanagawa-juku was too close to the Tōkaidō for comfort, and port facilities were instead built across the inlet in the sleepy fishing village of Yokohama. The Port of Yokohama was officially opened on June 2, 1859.
What other major ports are there?
Kobe, Osaka, Nagoya, Hakata, Tokyo, and Chiba. 