More and more people spend more and more time online. I wish more and more of them read RFC 1855 which covers netiquette guidelines. This document is more than 10 years old, but most of the points that it discusses are as valid today as they were back then. Some are even more important today than they used to be. Another good thing about this RFC is that it has theoretical directions combined with some practical advice.
A good rule of thumb: Be conservative in what you send and liberal in what you receive. You should not send heated messages (we call these “flames”) even if you are provoked. On the other hand, you shouldn’t be surprised if you get flamed and it’s prudent not to respond to flames.
Reading this document won’t make you wise enough to avoid all the mistakes of online communications, but it can seriously minimize them.