Well you can legislate against rape and child abuse so you can legislate to keep stuff like that off the internet. We have censorship of TV and film but not enough.
1. The things you mentioned are ALREADY illegal on the internet in certain forms and contexts... because those things fall under other existing laws.
2. Please be aware that many countries already have criminal laws against "hate speech", and if you query many liberals in the Western World, they'll tell you the BIBLE QUALIFIES AS HATE SPEECH, AND SHOULD BE CENSORED.
We must be extremely careful about protecting freedom of speech and freedom of expression, or we'll get censorship laws all turned back upon us.
How could this happen?
Here's a rudimentary example.
Some nice Christians may want a law that will only censor internet "bullying", but an atheist politician may craft the language of that law in a vague way so that preaching the Bible on the internet could be defined as "bullying", and therefore bible preaching might be censored.
This is how the lost world thinks, and this is how things are done in the real world.
It's safest to have less legislation, and just learn to censor ourselves, and censor our own families.