ONLINE media will be banned from marketing junk food and confectionary to children in the UK from July next year, in the latest bid to tackle obesity through curbs on advertising.

The announcement today [Thu] by the Committee of Advertising Practice (CAP) - the body which sets rules for advertising in the UK - will outlaw the promotion of food and drink high in fat, sugar and salt on any platform where children account for more than a quarter of the audience. In this context, that means anyone under 16.

The ban will not only apply online and on social media, but will also extend to print and cinema and bring non-broadcasters into line with existing restrictions on television commercials.

It comes days after health experts gathered at the Scottish Parliament to give evidence to the Health and Sport Committee's inquiry into obesity. Scotland, like most of the western world, is facing a crippling public health crisis. Obesity is the single biggest cause of cancer after smoking and triggers 80 per cent of new type 2 diabetes cases - but is the battle against it truly winnable?

Let's face it - if calorie-dense foods such as pizza, chocolate, cheese and doughnuts did not taste so good, there would be no obesity crisis. On top of that we are bombarded daily by a barrage of cheap, fattening foods - from high street takeaways and TV adverts, to supermarket multi-buy deals disproportionately promoting junk food. Our caveman brains are simply not evolved to cope.

Relying on individuals to exert willpower has failed, and always will. As one long-term obesity campaigner put it this week, it is time for a "big stick" approach.

Advertising restrictions are welcome, but they should probably go further. As Cancer Research UK noted in its evidence to MSPs this week, the current television ban only applies to commercial breaks on children's channels or during children's shows - but these are not actually the most watched programmes by under-16s. Ofcom estimates that extending the ban to all programmes before the 9pm watershed would more than halve the number of junk food adverts they view.

But why not take it further? If we can justify blanket advertising bans on tobacco products on public health grounds, perhaps sugar-loaded and high-fat foods should be treated with the same contempt and tucked away in plain packaging behind supermarket counters to discourage consumers from impulse buys. Why not ban the marketing of fast food and high-calorie soft drinks from sports stadiums, Formula One cars and the pages of glossy magazines? Fifty years ago the idea that such restrictions would have been placed on cigarettes might have seemed equally fanciful.

Big brands have always promoted the idea that exercise is the way to consume their products while staying slim; it's not a coincidence that McDonald's, Coca Cola and Cadbury's were Olympic 2012 sponsors.

Exercise is vital to overall health, but cutting out excess calories is what turns the tide on obesity. According to the World Health Organisation, the rise in obesity during the past 40 years can be explained by "increases in calorie intake alone" - excluding any decline in physical activity.

Somehow, overeating has to become as big a social taboo as smoking.