Aristotle stressed the importance of modeling virtuous thought in children. As great a task it may seem, creating a moral compass for your child requires little more effort than your own good example. Children learn by example in their homes, their schools and their community. While we can't control their behavior, we can help them make the right decisions. Lead by Example.
Parents are infallible heroes and children are their copy-cats.
They do as they see fit by example, good or bad. Watch what they watch on TV, don't make them watch your programs. We can't control everything our child sees outside the home, but we can shield them from inappropriate material in our own homes. We can also make our preferences known to caregivers and babysitters. Even better, shut off the TV and read.