How to stop defiant behavior in 7 year old?

Discipline . Praise good behavior, kids thrive very well in a lovable environment. For unacceptable behavior take away privileges, sometimes just ignore the bad behavior so it becomes extinct. Provide reasoning for the punishment so child learns to differentiate right from wrong. Talk to him/ her like a friend of his age and listen to his concerns.Sometimes all they need is your attention.