Rule
Separate antithetical elements—expressions that contrast a preceding word—with commas.
Examples
I got a quarter, not a dollar.
The older, but still beautiful, woman gave it to me.
I have a sweet tooth, but hate chocolate.
The wilted, yet beautiful, flower stood out.
We won the match, although we played our worst so far this season.
Note with the last example:
Usually, you don’t use a comma to separate a dependent clause that comes after an independent clause; however, you do if the dependent clause is antithetical.
Although we played our worst = antithetical.
Exceptions:
Don’t need commas with the word pairs “not only” and “but also”
Don’t need commas if the phrases are short and parallel
I am not only bored but also tired.
The war caused not only destruction and death but also generations of hatred between the two communities.
No commas needed. An author may choose to use a comma before “but also” if the sentence was particularly long.
We saw cheetahs, not lions.
We saw not lions but cheetas.
These are both short, but the first one takes a comma since the construction isn’t parallel. The second one doesn’t, as the construction is parallel.
Practice
I hoped they would have a nice breakfast not just pastries.
The downstairs not the upstairs has more toys.
I unlike all my siblings do not enjoy watching sports.
My husband decided to DIY our solar although he had never done anything similar.
The rider promised not to use spurs unless absolutely necessary.
The new restaurant although expensive was delightful.
When writing, consider not only your topic but also your audience.
A cat as opposed to a dog doesn’t need to be taken for walks.
Answers
I hoped they would have a nice breakfast, not just pastries.
The downstairs, not the upstairs, has more toys.
I, unlike all my siblings, do not enjoy watching sports.
My husband decided to DIY our solar, although he had never done anything similar.
The rider promised not to use spurs unless absolutely necessary. (No comma. The “not” here isn’t contrasting anything)
The new restaurant, although expensive, was delightful.
When writing, consider not only your topic but also your audience. (No comma with the pair “not only” and “but also”)
A cat, as opposed to a dog, doesn’t need to be taken for walks.

