I'm working on a site. It contains a lot of comments. When a user click the view page source
in any browser, I want to hide or remove the comments from the HTML.
Is this possible? If possible, could someone say a way to achieve it.
Well you cant do that. But before you upload the html files to your server you can minify the source and upload them. But before uploading check if everything is working as expected or not. Try this website.