HTML comments - how to use <!-- --> tag

The HTML <!-- comment --> tag is used to define comments regarding the HTML code. The comment is not displayed on the browser. The comment is usually used to make notes for the developers. The comment tag can also be used to hide JavaScript snippets - this is really beneficial for older browsers that did not support JavaScript. The developer could embed the JavaScript within the comment block and depending on browser's support for JavaScript the script would be executed or treated as comments. The comment is also used by certain browsers like Internet Explorer to execute different styles depending on the version of Internet Explorer.

Check here to learn more about HTML comments.


<!--this is a comment--> <!--this is a multiline comment -->
<head> <!--[if IE 8]> Instructions for IE 8 here <![endif]--> <!--[if IE 9]> Instructions for IE 9 here <![endif]--> </head>