Part of Alexandria was in the District until it was retroceded to Virginia in the 1830s. It’s one of several neighborhoods/cities that kinda sprawled across L’Enfant’s District line over the years (Chevy Chase and Takoma Park also had trouble being confined to a single government area).
Up until the 1950s, a lot of DC’s outer neighborhoods considered themselves to be “towns” in their own right. A letter from DC would likely have “Georgetown, DC” or “Brookland, DC” on it. Many residents of the DC leg of Takoma Park still write “Takoma, DC” on their letterheads. It’s kinda pretentious, but as long as they put the right ZIP code on it, they get their mail.
Arlington across the river has similar oddities. Although Arlington is generally regarded as a city, on paper it’s a county and it’s neighborhoods are towns (Rosslyn, Crystal City, Clarendon, Lyon Village, Shirlington, etc).
I really love DC; moreso when I don’t actually live in it.