Is it a crime? Probably not. Is it a good idea? Also probably not. What'd he say? Why'd he say it? Can you (the adult) come up with a better way than hitting him for you and he (the kid) can be on the same page about his use of inappropriate language?
There are crimes for inflicting unjustifiable pain or injury on a child. There are also parental discipline exceptions. A parent may use reasonable corporal punishment (i.e. spanking) a form of discipline. If it crosses the line and is unreasonable (too much force, causing injury, etc.), then it could become a criminal matter and filed as child abuse.
I never put a disclaimer on my answers beyond the standard one built in with avvo.com, but for this answer, I am.
*** The above answer in no way suggests, condones or encourages physical punishment or discipline against a child, no matter what the circumstances. It is not meant to encourage or justify any individual parent's actions against their child, nor is it intended to be legal advice regarding what, if any, force is legal or appropriate against a child. It is a general answer based on general principles of California law. ***
If you left bruising, welts, or marks and the child goes to school and can't sit down, then you run the risk of having the teacher ask what happened and as a mandatory reporter for suspected child abuse, you are likely to get a call from the Department of Children and Family Services- and that's exactly how it can happened that something you think is not legal ends up being filed as a case in juvenile dependency court and the court will remove the kids from you pending a hearing. I see it happen quite often, and othertimes, parents fighting in custody battle start to make so many abuse allegations about eachother that they can both wind up where they don't want to be- in Children's Court.
You should carefully examine "whoopins" which is a term often associated with "welps" or for leaving "welts" and commonly associated with child abuse. You may want to refer to your conduct as 'an age-appropriate pat on the behind"!