A question many parents ask- my response- "That depends. Is your kid good with dogs?" The kid/ dog dynamic is an important one. Most young kids are afraid of dogs, and many dogs are afraid of kids. I am very lucky to have friends with kids that are "good with dogs". It is important to have good experiences right from the beginning.
If you have young children, and they see a dog they would like to pet (touch)- here is the proper etiquette. They should ask the person with the dog, "may I please pet your dog?" If the dog is not friendly, the owner can prevent a bad situation, and even if the dog is friendly, the owner has the opportunity to prepare for the encounter. For example they may ask the dog to sit, or they might kneel down to be at the level of the dog and child.
Your child should never approach a dog that is tied up, or stick their hand through a fence to pet a dog. If they see a loose dog, never run. They can "Stand still and pretend to be a tree."- the dog may just approach and sniff the child, or they may ignore the child- but if the child runs away, it might cause the dog to chase them. Teach your children how to behave around dogs. The relationship humans can have with dogs is so rewarding, but communication between our two species is a learned process and it is not always a natural process. 