Junk food ads targeting children online are now banned in the UK, from July of next year. Getty

The advertising of high fat, salt, or sugar (HFSS) food or drink products targeting under-16s has been banned across all non-broadcast media, UK advertising regulator the Committee of Advertising Practice (CAP) has announced.

That includes online and in social media, in print, and in the cinema, "bringing the non-broadcast advertising in line with the TV rules," the committee said in its announcement, as it quoted research from Ofcom showing that time spent online has for the first time surpassed time spent watching the TV for young people aged between 5 and 15-years-old.

The ban also applies to other media where children make up over 25% of the audience. The use of techniques used by advertisers, such as promotions, licensed characters, and celebrities, has also been banned from being used in any ads for HFSS products. Instead, "advertisers may now use those techniques to better promote healthier options," it said.

However, cartoon characters and celebrities will still be seen on food packaging, such as the boxes of breakfast cereals high in sugar, The Guardian reports.

The new rules, which will apply from July 2017, follows a full public consultation which closed in July of this year. The chairman of CAP, James Best, said:

"Childhood obesity is a serious and complex issue and one that we’re determined to play our part in tackling. These restrictions will significantly reduce the number of ads for high, fat, salt or sugar products seen by children. Our tough new rules are a clear demonstration that the ad industry is willing and ready to act on its responsibilities and puts the protection of children at the heart of its work."