How to Use HTML Comments to Document Your Code HTML comments are used to document code and provide additional information about the code. Comments are not displayed in the browser, but they can be seen by anyone viewing the source code. To add a comment to an HTML document, use the following syntax: The text between the opening and closing comment tags will not be rendered by the browser. Comments can also span multiple lines... Read More »