Facebook has been hit with a €1.2m fine in Spain for violating privacy laws. REUTERS/Philippe Wojazer

Social media companies like Facebook and YouTube must take responsibility for the material they host and be punished if they do not remove racist, extremist or child sex abuse content, a parliamentary committee will recommend.

There will be a push for a change in the law to make sure that social media companies are deemed publishers, rather than platforms, and so would be liable for any illegal content that is available on them.

Theresa May's independent ethics watchdog committee will call for legislation to ensure websites that did not comply face punishment, the Times reported.

The report by the Committee on Standards in Public Life looked into how politicians were routinely harassed during the last general election campaign.

Its conclusions examine the role of social media and is likely to outline the importance of how quickly offensive or defamatory posts are taken down, the paper said.

The UK government is currently examining whether there should be a code of conduct implemented that would be reinforced by legislation.

The committee's chairman, Lord Bew, has said in the past that they have not been happy with how companies have reacted to abusive content. The crossbench peer, said according to the Times that despite being "allergic" to legislation, "I have had to think long and hard about my traditional uneasiness about this matter".

YouTube and Facebook have faced repeated criticisms for failing to take down abusive, racist or anti-Semitic content.

YouTube logo

Tony Jaffa, from the law firm Foot Anstey, told the Times that a change in law could mean a raft of cases where online giants face criminal or civil court cases.

"This goes to the issue at the heart of the debate that technology companies say they are platforms and not publishers so they cannot be held responsible for what their users do. Others say they are most definitely a publisher and so provide the platform just as conventional publishers do".

Meanwhile, the former executive of Facebook, Chamath Palihapitiya, had some harsh words to say about his former employer, which he blamed for "ripping apart society".

"You don't realize it, but you are being programmed ... but now you got to decide how much you're willing to give up, how much of your intellectual independence," he said.

"The things that you rely on, the short-term dopamine-driven feedback loops that we have created, are destroying how society works: no civil discourse, no cooperation, misinformation, mistruth," he said in an interview in November at Stanford's Graduate School of Business, reported by the Verge.