Mobile phones should be banned from the dinner table and bedtimes as part of a healthy approach to devices, the UK's four chief medical officers have said.
Children should also take a break from screen-based activities every two hours, the government advisers said.
And they added industry must do more to keep children safe.
Their guidance comes as English Health Secretary, Matt Hancock, is set to meet bosses at Instagram over the handling of self-harm and suicide content.
Links have been made between the suicide of teenager Molly Russell and her exposure to harmful material on Instagram.
Her father has said he believes the Facebook-owned platform "helped kill my daughter".
Prof Dame Sally Davies, England's chief medical officer and the lead for the UK, said the case was "tragic" and it was clear some children were being exposed to inappropriate content.
She told the BBC companies had a duty of care to help keep children safe and that age limits for using social media needed to be properly enforced and children should not be channelled towards harmful content - one of the key concerns in the Molly Russell case.
But Dame Sally said a review of evidence had not proven a clear link between screen-based activities and mental health problems.
And digital technologies could be a force for good, aiding online learning, socialising and helping people manage health conditions.
What does the guidance recommend parents do?
There are several clear steps for parents, which the chief medical officers say will help keep children safe and healthy.
- not using phones and mobile devices at the dinner table - talking as a family is very important for development
- keeping screens out of the bedroom at bedtime
- talking as a family about keeping safe online and about cyber-bulling and what children should do if they are worried
- not using phones when crossing a road or doing any other activity that requires a person's full attention
- making sure children take a break from screens every two hours by getting up and being active
- policing their own use too - parents should give their children proper attention and quality family time and never assume they are happy for pictures to be shared
Is new legislation needed?
Dame Sally said a code of conduct was definitely needed.
She wants to see technology companies invest in systems that properly vet the ages of users - a number of platforms require users to be 13 but these were not properly policed, she said.
The guidance is also critical of what it calls "persuasive design".
This refers to techniques used to encourage addictive behaviour, including collecting likes and rewards for performing actions such as sharing pictures.
Dame Sally also wants social media companies to develop better algorithms that push positive content to users.
This has already been done for users who search for content that could potentially radicalise them.
Instead of being fed material that promotes terrorism, users get content that aims to de-radicalise.
Dame Sally said the same thing could happen when people searched for "self-harm" or "suicide".
"We would like to see content that promotes help-lines and where to go for support," she said.
And she warned if industry did not act, ministers were likely to legislate to compel them.
"They need to sort themselves out - to safeguard our children," Dame Sally said.
"They have a duty of care - and if they don't, I expect the government will tell them how they will sort it."
What do internet companies say?
Facebook welcomed the guidance and said it wanted young people to be safe online.
It said it had introduced a new tool to help people see how much time they were spending on Facebook and Instagram, with daily reminders and a way to limit notifications.
Twitter said it had introduced 70 changes in 2018 "to make the service healthier and safer".
Does regular use cause mental health problems?
The chief medical officer used a team of academics to scour the research done on this issue.
The academics said that, while some research had pointed to an association between screen-based activities and negative effects such as an increased risk of anxiety and depression, it was still inconclusive.
It could be just that people who struggled with mental health problems were more likely to turn to their devices, Dame Sally said, rather than their habits being the root cause of the problems.
Nonetheless, Dame Sally said, there needed to be a precautionary approach to this - until more research had been done - hence the guidance to parents.
Dr Bernadka Dubicka, of the Royal College of Psychiatrists, said the medical officers were right to be cautious.
"We do not yet have enough evidence to draw a definite link between screen time and mental health problems - but it is clear that some of the content that young people are viewing online, such as pro-anorexia, suicide and self-harming content, can be incredibly harmful," she said.
The chief medical officers' guidance comes after leading paediatricians said last month that parents should worry less about screen use after a review found there was little evidence it was harmful in itself.