Marco Longhi visited Bramford Primary School in Woodsetton to see the 'Be Internet Legends' programme in operation.
The scheme, which is delivered in partnership with Parent Zone, has trained more than five million children across the UK in online safety.
It focuses on five pillars, aimed at teaching pupils aged 7-11 to become more internet savvy and to always be alert when online.
Dudley North MP Mr Longhi hailed the impact of the programme and said: "I also had the opportunity to speak to the children about the importance of being brave and speaking to an adult if they see something that makes them uncomfortable online.
"I want to thank the school and Google for their efforts making children safer today."
Rosie Luff, from Google, said: "We are delighted to visit Bramford School today to help teach children about how to Be Internet Legends.
"By teaching what we believe are the five core areas of online safety, we want to prepare children to have a safe and positive experience online."
Vicki Shotbolt, CEO of Parent Zone, said: "It is essential that children learn to think carefully and critically about what they do and see online."
A free digital curriculum, including activities, is available online.