Adding comments in your code can be useful to write notes for yourself or other developpers working with you, to include notes about the HTML code.
The comments in HTML code are not visible by visitors when they browse the website, but they can be visible if the visitor open the source code of the web page, so do not include private data in them.
1
Add the "<!-- -->" code
To include comments in HTML, just add <!-- then your comment, then close it using -->.
Example: <!-- This is a comment -->
That's it!
You can use comments to help yourself or other developpers to recognize portions of HTML code, their role, the status of the code ("beta", "temporary fix"...) or to identify third party code that you're not supposed to modify, example:
<!-- Google Analytics START --> [ some code... ] <!-- Google Analytics END -->