If your child hears someone making a racist remark, you should treat the occasion as a learning experience. Tell your child that that sort of comment is hurtful, and that you don’t say things like that in your family.
It’s unlikely that a child as young as two will even register the event, however, if your child does remark on the comment, let him or her express their feelings. Saying something like ‘I understand that that made you feel unhappy too,’ leaves the issue open, but allows you to express your opinion too. Since children learn from their parents’ reactions, it’s important that you make your feelings know calmly.
Tell your child that in your family, you believe that everyone has a right to be respected, regardless of their ethnicity, religion or gender. Don’t confront strangers who may say something that you find offensive, but saying something to a friend or relative immediately after they have said something racist is a good way to show your child how you feel.
Try to avoid conversations or topics where people you know might be tempted to make racist remarks, but if they do, deal with the situation calmly and concisely. Then speak to that person later, in private. Ask them to respect your viewpoint, even if it’s only in the presence of your child, and not to make those kinds of comments. You have a right to voice your objections on this score, and while you probably can’t change their views, you can make sure they don’t pass them on to your child.
Lastly, make sure that you’re setting a good example. Respect everyone equally, regardless of race or colour, and make sure that you’re always polite and courteous. That’s the best way to raise a non racist child.