TOWNHOUSES ARE A TIMELESS alternative to the single-family detached suburban home. Standing shoulder to shoulder with other buildings, they come with little maintenance, no persnickety co-op boards, and often with gardens or courtyards. Best of all, there's nobody above or below.

Townhouses are many things to many people. They can be small and affordable or luxurious and as large as a detached residence. A townhouse can be a first home or a last home; a place for singles looking for freedom from constant upkeep or a smart solution for middle-class families while they wait out an overheated market.

While townhomes have long been a builder staple in the suburbs, especially where land is in short supply, urban versions present different challenges. As the following projects show, a townhouse in the city is all about amenities. Buyers will pay a premium for elevators, fireplaces, dazzling details, green space, and good light. And, of course, a curb cut that allows for a driveway and garage—often for two cars. Whether they're in San Francisco or Philadelphia, glass-and-steel or stone-and-marble, the ultimate trophy townhomes are flawlessly tied to their surroundings, yet unusual enough to catch the eye of prospective buyers.