An HTML comment is used to provide additional information about the HTML code, and the browser does not display the comment on the interface window.
HTML comment tag
Like other HTML tags, we have a particular tag to write comments. The only purpose of the comments is to provide the information about the code, so if another developer sees the code, he or she could understand what this set of code is supposed to do.
<!-- This is a comment -->
Comments for Notification
<!-- Create a form Here --> <p>Please fill the form</p> <!--Also change the font size of above paragraph -->
Comments for Debugging
<!-- we do not have a valid image source for image tag <img src="" alt="Cat picture"> -->
- Comments are generally used to provide information about the code itself.
- Comments have nothing to do with end-user; they are only for developers.
- Comments also used to set a notification or remainder in the code.
- The comment also used to debug the code.
- Using comment we can comment out another HTML elements.
- To comment out multiple lines in IDE or Text editor press Ctrl + /