Children will do as their parents have been doing in front of them. Their observation of what you do is what needs to concern you the most. It is the work of the parents to teach their kids what value to uphold and how to act responsibly. We live at a time when interaction with the internet is a major part of life. The internet affords us so much to take. You shall not find anything else that can give you that much access to that much information at once. But you need to access it in a responsible way if it is to remain a positive thing. Since they shall at some point access the internet, it is beneficial for all concerned if you can teach your kids how to interact with the resource responsibly. Here are some of the things you can do.
You need to tell them the meaning of bad behavior online, and what good behavior is. You need to take the same approach of showing them what is right from wrong in other areas of life and apply it here. They should know how bad cyberbullying happens to be. They need to know the importance of not hurting others online. If they were on the receiving end, they would not like it any better. They need to see the value in being kind to others. As they come to appreciate all the positive influences, they will shun any negative ones that come their way.
You then need to institute parents controls and also find a kid-friendly search engine. This is how you will know more about the kind of sites they visit. It shall also block any attempts to visit something not suitable for them. Tell them of the good sites they can visit, and the amount of info they can share. Oversharing is the thing that has cost so many kids their peace.
You then need to teach the older kids some of the laws that touch on online behavior. This is how they get to learn of what it means b law to harass others. This is also how they come to appreciate the gravity of haring nude photos with friends online. They will be seen as violating child pornography laws, which gets them branded as sex offenders. What may be fun, a reaction from peer pressure or the result of blackmail may leave them with huge problems to deal with for the rest of their lives. They need to report any such attempts to you.
There is a need for you to set a good example. Kids often do what you do, and less of what you tell them to. They will, therefore, do what they see you do with your devices and online presence. You should at all times give a good example.