This one's actually pretty easy, Anne...
As soon as he bites too hard, yelp. His ears should go back and he may start licking you furiously.
If not, or it continues, IMMEDIATELY put him on the ground and roll him on his back/side. Hold him like that (your hand on his chest/shoulder) and stare at his eyes until he calms down and submits. You may even want to softly growl. This is dog language for "I'm the boss and this is NOT acceptable behavior". If he squirms or kicks or tries to get up, don't let him until he freezes up for a good 5-15 seconds. He should also look away.
Then, let him up. Repeat if he bites again.
Somewhere along the line he got trained (probably unintentionally) that biting was an acceptable game. Shaking his muzzle with your hand only reinforces that. Make sure the hubby, kids, neighbors, ... whoever knows not to shake their hands in his face or play "keep away".
Yelling is never an option. It means nothing to them.
Do you know the hardest thing to train a dog? "Down" (lay down). Why? Because it's a submissive position. On their back is even more submissive. Watch 2 dogs play. They will take turns being on the top and on the bottom.
Get a book on "dog language". You will learn a lot. Once you can speak their language of body position, posture, whines, snarls, etc you will find communicating with them much easier. Also, you will learn how to read body language of not only your dog, but neighbors' dogs, strange dogs that approach you, and dogs interacting at the dog park.
One clue. When you meet a new dog and what to make friends, get down on your knee or hands/knees to greet it. Never reach down from a standing position. Also, to keep a dog from jumping on you... get down.
I got lots more...lol.
Good luck, and let us know how it works.
Reinforce good behavior, but negative reinforcement is a no-no, other than asserting your dominance as I've discussed above.
Walt (and Nikki and Shadow)