The best way to teach is to show them.
Human is a special species in part because we can learn by imitation1. We are programmed to copy others’ actions, understand them, and incorporate them into our own. Children, in particular, watch everything their parents do very carefully.
So, be the person you want your child to be — respect your child, show them positive behavior and attitude, have empathy towards your child’s emotion — and your child will follow suit.