Don’t approach a dog you don’t know. Always ask the owner before petting a dog.
To this I would add
Never tease a dog with food
Never wake a sleeping dog (there is a reason for the proverb)
Never sneak up on a dog - I've seen children who are old enough to know much better deliberately creeping up on animals then suddenly pouncing and shouting 'RAARGH!" and they think it's hilarious - little bastards! Any dog which bit in a situation like that would be totally justified, and I would be a witness for the defence.
TBH - recently I have seen a massive increase in the number of children who do ask. It's an absolute delight and I always compliment them on their good sense and good manners.
I think perhaps awareness of dog etiquette is just seeping through. When Was a child, people let their dogs out during the day and they just roamed the streets - there were quite literally packs of dogs around (and a horrible amount of poo!). Children either instinctively knew not to p
approach them, or like me, had been taught to respect a dog's space.
When I was young, if I had rushed up to a dog and got nipped, my parents would have said "It's your own fault - how often have we told you?" And they would have been right. And children very rarely got bitten because we knew how to treat dogs.
Nobody seems to take any responsibility for their own or their children's safety these days - it's always the other person who is at fault. This applies not just to dogs, but to railway lines, building sites etc - all of these dangerous things are magnets to kids, and as has been said - you can't watch them all of the time.
Accept then, that if something happens it may be your child's fault, or no-one's fault. If he/she, breaks through the fence onto a railway line, sneaks through onto a building site - hurts a strange dog - there may be tragedy.
None of us wants this to happen -our children are precious - so it ays us ALL to take as many precautions as we can regarding our child's safety - and that includes not approaching strange dogs.