Adverts from KFC, Kellogg’s, KP Snacks, Lidl and Pringles were also banned by the Advertising Standards Authority (ASA), which used child avatars to detect adverts for food and soft drinks high in fat, salt or sugar (HFSS).
Over two weeks in the run-up to Christmas in 2018, the ASA used child avatars to simulate the online profiles of children in order to identify the types of advert they see across the internet.
The monitoring found that 2.3 per cent of the 41,030 adverts delivered to child avatars across general interest and youth interest websites as well as YouTube channels were for HFSS products.
The Committee of Advertising Practice (CAP) asked the brands to take immediate steps to ensure that the adverts would no longer appear.
The companies were also asked to provide information on their systems to ensure their adverts were not placed inappropriately in future.
The CAP said it had also asked YouTube to ensure all parties understood the findings and could take the action necessary to avoid repeat breaches of the rules.
ASA chief executive Guy Parker said: “The problematic ads we found were relatively few in number, compared to the total served, but we'll take action in respect of any ad for high fat, salt or sugar food and soft drinks which is found to be directed inappropriately at children.
"We'll be following up with similar compliance sweeps in the future."
Google spokesman Michael Todd added: "If we discover ads that break our policies, we take swift action.
“We're reviewing the findings of the report and will continue to work with the ASA, as well as providing materials and training to advertisers so that they can reach the right audience on YouTube.”
In March 2019, the Department of Health and Social Care (DHSC) announced plans for junk food adverts on TV and online to be banned before 9pm as part of the government’s plans to fight the epidemic of childhood obesity.
According to the DHSC, one in three children leaves primary school overweight or obese and the number of children classed as seriously obese is at a record high.
It adds that obesity and being overweight also contribute to at least one in every 13 deaths in Europe.
Campaigners, doctors and politicians welcomed the announcement about the proposed advertising ban.
TV chef Jamie Oliver said: “If we don't find effective ways to improve our kids' health, UK children will live shorter lives than their parents. It's a fact that kids are hugely influenced by junk food ads - so the media and the food industry has a real opportunity here to do something about it.”
Junk food adverts during children's TV shows have been banned since 2007 but research by broadcasting regulator Ofcom claimed youngsters spend 64 per cent of their TV viewing time watching shows not aimed specifically at them.
Join our new commenting forum
Join thought-provoking conversations, follow other Independent readers and see their replies