HTML comments are used to add hidden text in your code, that dont show up on your website, but still available in code, mistly comments are used to hide some part of your HTML code, so code will not run but still available to use in future. Or we use comments to tell wich part of website working what.. HTML tags for comments are <!-- Your Cooment --> Code (markup):
Comments are good for dividing you code so that its easier to understand. If you go back to re-code after a long period of time, you'll find it much easier to decipher everything.
Commenting your HTML is a really good practice. And you can understand your own code easily later as well.
An HTML comment begins with "<!--", ends with "-->" and does not contain "--" or ">" anywhere in the comment. Some comment examples : <!-- I am a HTML Comment --> <!----> <!> Code (markup):
An HTML comment strated with <!-- not display the commented part -->.In HTML you should use comment tag the commented part of html should not displayed in browser.
<!--This is a comment. Comments are not displayed in the browser--> <p>This is a paragraph.</p> This is single line and mutiline comments.
<!--This is a comment. Comments are not displayed in the browser--> <p>This is a paragraph.</p> This is single line and multiline comments.
This means that the following are all legal SGML comments: <!-- Hello --> <!-- Hello -- -- Hello--> <!----> <!------ Hello --> <!>
By asking us an intelligible question. We will be happy to help you as soon as we understand what you mean.
The comment tag is used to insert comments in the source code. Comments are not displayed in the browsers.