Plenty of herbs do really well in pots, either outside on a sunny patio or in the windowsill. In fact, keeping certain herbs in pots is the only way to contain them. (I’m looking at you, rosemary!)
Mint is a great herb for container gardening; it’s quite hardy and its many varieties give you lots of options for adding to teas or cooking with. It can handle shady spots too, though expect it to get a little leggy. You can easily separate mint (it spreads by sending out runners) and share it with friends and neighbors as well. There’s even an old wives’ tale that suggests ants are repelled by mint. At any rate, it surely can’t hurt! When mint flowers, it attracts lots of pollinators as well.
Chives are lovely in a smaller container, and you can snip them and let them grow back over and over again. They’re great in soup, as a garnish, or sautéed in lots of dishes. Their pretty flowers attract bees, always a plus! These tend to do best in moist soil though, so don’t let them dry out.
Rosemary will fill whatever container you choose to put it in, and it requires a somewhat sandy, well-drained soil. Rosemary can grow quite large if it’s happily situated, and its leaves are wonderful for bread, pasta dishes, and as a garnish.
Basil strongly prefers warm, sunny spots with some shelter from the wind, though if your container is in an exposed area, you can gently stake it with some twine and a vertical support. Like rosemary, it also prefers well-drained soil, and it does best when watered in the morning, at the base.
Cilantro, also called coriander, is perfect for containers, and its long taproot makes it a good choice for a tall, deep container. Plant it in well-drained soil and place it in a sunny spot, though a little shade is OK too.