The words however and therefore are adverbs. However (as you can see right here), they are also connecting words, joining what comes right before them to what is right after them.
However often functions as a conjunctive adverb, kind of a hybrid part of speech! And according to Webster, therefore is an adverb often used with “conjunctive force.”
There is no problem when these two words are at the beginning of a sentence. They are generally followed by a comma, and they refer to the sentence right before them:
I failed the test. Therefore, I will have to take it again.
I passed the test. However, the last time I took it I failed.
Can you use a semicolon before them rather than a period? Yes, since the two sentences are likely to be closely related, using a semicolon and a lowercase letter is also fine:
I failed the test; therefore, I will have to take it again.
I passed the test; however, the last time I took it I failed.
Okay. What about using therefore or however in the middle of a sentence and using commas around it? Is that right?
Sometimes. It depends. In the above examples with the semicolons, we have used therefore and however in the middle of a sentence; however, we have used a semicolon before them. A comma would not be correct.
Now look at these sentences:
1. Wherever you go, however, your problems will follow you.
2. I am moving to the East Coast, however, and if my problems follow me, so be it!
3. I need a babysitter and, therefore, will not be attending the wedding.
Those are correct. These are wrong:
4. I am going to Paris, however, my sister isn’t.
5. I need a babysitter, therefore, I am not going.
What’s the difference? In the five examples above, take out the however or therefore. If everything is punctuated correctly without those words, you are okay. However, if you are left with a run-on sentence, you need a period or a semicolon. Let’s check the examples above by taking out however or therefore.
1. Wherever you go, your problems will follow you. This sentence is fine, so you can safely put however within commas. It is simply a sentence interrupter.
2. I am moving to the East Coast, and if my problems follow me, so be it. This sentence is also fine, so commas around however are fine.
3. I need a babysitter and will not be attending the wedding. Also fine.
4. I am going to Paris, my sister isn’t. Not okay. You cannot use commas around however here. You need two separate sentences or a semicolon (or conjunction).
5. I need a babysitter, I am not going. Not okay. You cannot use commas around therefore here. You need two separate sentences, a semicolon, or the addition of a conjunction.
By the way, many people make a similar mistake with the word then. Then is an adverb. It tells when. It is NOT a conjunction and cannot connect.
I am going to the movies, then to dinner. Wrong.
I am going to the movies and then to dinner. Right.