All TalkersCode Topics

Follow TalkersCode On Social Media

devloprr.com - A Social Media Network for developers Join Now ➔

HTML Comments

Comments is a piece of code ignored by the browser.It is good to add comments in your codes to easily understand the code.


Comments are placed between the <!--Whatever in between is comment-->.


Example of Comment

<!--All the text,code or anything in between is consider as comment-->



  • Conditional Comment:Conditional comments only work in Internet Explorer (IE) on Windows but they are ignored by other browsers. They are supported from Explorer 5 onwards, and you can use them to give conditional instructions to different versions of IE.

<html>
<head>
<!--[if IE 6]>Special instructionss for IE 6 here<![endif]-->
</head>
<body>
<p>This the example of condiational comment.</p>
</body>
</html>

❮ PreviousNext ❯