How do I go about writing my first message in online dating? What do I write?

Actually, it should be much easier to write an online dating message than to talk to someone at a bar. After all, you’re sitting alone at home in front of your computer and just punch in a few keys without any hassle. And still you get inside of your own head: on the other side of the line is a person you like, someone who should read the message and hopefully likes you back. Phew, so, what to write?
Quite simple: Not too much, not too little. Not too serious, not too shallow. Not too personal and not too superficial. And above all else: Respectfully and honestly assure that you are really interested and want to learn more about the other person.