The British Heart Foundation's Food4Thought campaign is to use a virtual town and an online character to educate children about healthy eating.
The latest stage of the campaign, which aims to encourage children to take responsibility for what they eat, will be launched in January. Online advertisements will direct young people aged 11 to 13 to the foundation's website, where they will be able to enter the virtual town and meet a character who will give them information about healthy food.
David Barker, head of communications at the BHF, said the charity decided to try to interest children through the internet because they were "online-savvy" and spent a lot of time communicating with friends on the web.
He added that the foundation wanted to tackle online food marketing head-on. He said: "Brands are shifting their budgets online and food brands are targeting kids in an engaging way - we're taking on the people marketing junk food."
Digital agency Avenue A Razorfish will be responsible for planning the campaign. Rob Lawrence, creative director at the agency, said: "More kids are online than ever before. They are sophisticated media consumers, so you have to be able to reach them in imaginative ways and keep them engaged."
This was not traditional advertising, he said, but a "communications continuum" that was effortless and entertaining.