The Australian Food and Grocery Council's voluntary code commits companies to directly targeting children under 12 only when it promotes healthy dietary choices and lifestyles.
But the code, which is supported by some 150 companies accounting for 80 percent of Australian sales in highly processed food and drink sectors, will not include hamburger giant McDonald's and competitor KFC.
The council said the new rules will apply to all television, radio, print, cinema and internet advertising as well as the use of licensed cartoon and other characters aimed at children.
"The aim of the initiative is to ensure that only healthy foods and beverages are advertised during television shows predominantly watched by primary school-aged children," the council's chief executive Kate Carnell said.
The self-regulating code comes as governments in several state governments move to introduce tough laws banning junk food advertising targeting children as they attempt to counter childhood obesity.
Carnell said the self-regulated code, which will start by early 2009 and be overseen by an independent arbiter, would be more effective than new laws.
But the Obesity Policy Coalition, which campaigns for obesity prevention, said children would still be exposed to television and other fast food advertising while watching mainstream programmes.
"That's a real problem because the highest rating programs for kids aren't programs that are made for kids," the coalition's Jane Martin told national news agency AAP.
A report issued by Baker Heart Institute in June found that obesity was the major threat to Australia's future health, with an estimated nine million of the 21 million population obese or overweight.