I'm not absolutely sure about this. Since web based e-mail messages are being read on the server I'd think that you can't get a virus from just viewing them. All I've ever read about web based mail says it's safe to read messages this way. Also, I don't know of any cases of a virus being caught from doing so. I personally think that web based mail should be safe and it's only downloading any attachments that require the usual caution.
On the other hand I do have niggle about this (probably the same one you have Harish

). Maybe others could help dispel it:
We read that HTML e-mail messages, and even web pages, can contain malicious code that might activate a virus. This being the case, it might be possible to get one by the mere fact that an HTML page is being opened. Whether or not a virus was caught would then all come down to browser security.
If there is a chance of getting a virus from opening web based mail, or any other web pages, then keeping up-to-date anti-virus software monitoring in the background should eliminate it.
I'm pretty careful in the Browser and E-mail Programs I use and their settings. As a result (maybe) I have never had a virus. Nonetheless I would never underestimate the capabilities of the virus writers to eventually place one on my computer by some devious method or other.
*Edit* Further thought:
I suppose by the time you get to read the web based e-mail it will have been processed (or re-written) to display it in the service provider's page format. This would almost surely mean that any code nasties are weeded out.