Viewing Source Code
Like every other programming language, HTML supports comments. Comments are parts of the web page that are skipped over by the browser. We can use comments to leave information that will be useful for future reference. The comments are useful for a team of developers working on a website. They could leave comments as a method of communicating what needs to be changed or added. They are also useful for solo developers. If someone returns to a project after a long time, they might have forgotten the details about the web page. We can read the comments to get an idea about the web page. Commenting is an important habit for any web developer.
<!-- This is a comment. The browser just ignores this part. -->
Using Comments for debugging
In some situations when an error occurs in a web page, we can use comments for finding the location of errors. We can comment out portions of text until the errors disappears. Then the error will be most likely in the section inside the comments. We can repeat this process for all the errors. Programmers use this technique for detecting errors and this also works for web pages.