Britain could hit Facebook and Twitter with a new tax designed to fight hate crimes and support victims of online bullying.

The government of Prime Minister Theresa May unveiled the proposal on Wednesday, saying it aims to ensure that "Britain is the safest place in the world to be online."

Culture Secretary Karen Bradley said the levy would target social media companies and communication service providers.

Details remain thin, however: The government did not single out specific companies, detail how the tax would be applied or estimate how much money it would raise.

Bradley said the levy would start as a "voluntary measure." But she also told the BBC that the government could pass a law if the voluntary scheme doesn't work.

She said the initiative would be similar to an existing levy on gambling companies that funds anti-addiction programs.

"The internet has been an amazing force for good, but it has caused undeniable suffering and can be an especially harmful place for children and vulnerable people," Bradley said.

Facebook (FB) said in a statement that it welcomes "close collaboration between industry, experts and government to address this important issue."

Twitter (TWTR) did not comment on the proposal specifically, but said in a statement that it had dramatically increased the number of abusive accounts it removes.

The tech industry has come under increased scrutiny in Europe, where politicians and regulators are considering the role of social media in society.

Related: U.K. says Facebook and Google must tackle hate speech

But analysts say there's been more talk than action so far in Britain.

"Bashing tech giants is easy. Clear, good laws for the digital age are much more difficult," said Carl Miller, research director at the Centre for the Analysis of Social Media at Demos. "Government, all too often, is taking the easy route here."

The European Union gave tech firms an ultimatum last month, saying it would pass laws allowing it to impose punishments on companies that fail to tackle online hate speech.

Related: Europe gives Facebook, Twitter final warning on hate speech

In Germany, social media companies can be fined as much as €50 million ($59 million) if they fail to quickly remove posts that breach the country's laws.

Critics of the new policies say they jeopardize free speech and expression.

Jacob Mchangama, director at the think tank Justitia, warned that Europe is moving in "an increasing illiberal direction when it comes to internet freedom and the free flow of information."