Claire Kerhwald Cook notes that when however means “but” or “in spite of that,” the term “should follow the element that contrasts with something previously stated” (28):
The main course was mediocre; the dessert, however, was fantastic.
She also observes that writers sometimes fail to put however in the right place. In the sentence below, for example, however comes too late in the sentence to provide a contrast:
The jurors who met to discuss the case could not, however, reach a verdict.
You might rewrite the sentence as follows:
The jurors met to discuss the case; they could not, however, reach a verdict.
In the following example, however comes too early:
The girls, however, assumed they would win their soccer match, even though the other team had a better record.
You might rewrite this sentence as follows:
The other team had a better record; the girls assumed, however, that they would win their match.
In some cases, you might wish to start a sentence with however. However, you should be cautious about doing do. Usage experts disagree on whether it is OK to open a sentence with the term, and some feel that the term should be kept to a minimum in general, since using but or yet is less obtrusive (Cook 28–29).
Cook, Claire Kehrwald. Line by Line: How to Edit Your Own Writing. Houghton Mifflin, 1985.