A lot will disagree with me, but I'm old school... I don't play when it comes to that... My daughter was terrible about biting, I would do timeouts, take her favorite toy away etc.. Finally one day I smacked her in her mouth and that was the end of the biting stage.... That's what worked for me.
I tell my son no firmly and get up and walk away from him. He does it for attention, so i take away my attention. He stopped biting after the third time I walked away from him.
Biting or hitting gets an immediate time out, no warnings. My son was awful about biting. He bit his sister’s back so hard once that she had a big spot that was very dark purple for about a week. Every time he bit, I would put him straight in time out for 2 minutes. When time was up I’d explain for the millionth time why he couldn’t bite and make him apologize to whoever he bit. He’s FINALLY stopped and hasn’t bitten in a few months.