Tim Berners-Lee, the British creator of the World Wide Web, has used its 30th anniversary as an opportunity to take aim at Silicon Valley.

Berners-Lee argued that the web has been tainted by misinformation, election interference, online harassment, in part thanks to the ad-funded business models pioneered by Google and Facebook.

Berners-Lee called on the government to regulate for the digital age.

Silicon Valley titans like to present their companies as more than mere services. From Mark Zuckerberg's mantra of "trying to make the world more open" to Alphabet's "Do the right thing", the major US tech firms often bill their firms as ultimately serving humanity for the better.

But the British engineer who invented the World Wide Web, Tim Berners-Lee, has Silicon Valley in his sights and warned on the web's 30th anniversary of a "downward plunge to a dysfunctional future."

Speaking to the BBC, Berners-Lee took a direct shot at Facebook by highlighting the Cambridge Analytica scandal as an example of how the web has gone wrong. He criticised the use of people's information for nefarious purposes, like trying to influence elections.

Read more: Facebook has a big, terrifying dream to be the communication backbone for the Western world

"Everyone realized that elections had been manipulated using data they had contributed," he told the BBC. "This person got all this data, and he got it under the pretext that he was going to use it for research purposes and he actually used it to manipulate an election."

It isn't clear exactly who Berners-Lee is referring to here, but the most obvious person is Aleksandr Kogan, the data scientist who harvested information on millions of people through a Facebook quiz app, then handed it to political consultancy Cambridge Analytica. That information was then used to inform targeted ads relating to the 2016 US presidential election.

Berners-Lee added: "I think with a mid-course correction... [we can] stop this downward plunge towards a very dysfunctional future, let's turn around. With a turnaround, a mid-course correction, I am then optimistic again."

In an open letter marking the web's 30th anniversary, Berners-Lee also criticised ad-funded services that promote "clickbait and the viral spread of information."

Facebook CEO Mark Zuckerberg. Mark Zuckerberg/Facebook

Both Facebook and Google have come under fire for algorithmically promoting content based on "engagement", a system which can end up favouring polarising, emotive, and often inaccurate material. The two firms also dominate online advertising, commanding 58% of the market between them, according to eMarketer.

Berners-Lee likewise called out "state-sponsored hacking" and online harassment, as well as the poor quality of online discussion.

"[While] the web has created opportunity, given marginalised groups a voice, and made our daily lives easier, it has also created opportunity for scammers, given a voice to those who spread hatred, and made all kinds of crime easier to commit," he wrote in the letter.

He called on governments to make sure the web remains "competitive" through regulation, and to ensure companies don't prioritise short-term profits over the long-term good.

Berners-Lee has already persuaded Facebook and Google to sign up to his proposed solution: A code of ethics that binds private companies, governments, and citizens to work for a better web. Published last November, the "contract" asks people to commit to a free web, and to respect the right to privacy, among other principles.