When writing in HTML, the tag is used to write remarks into the source code. HTML comments can be useful for explaining code while not being displayed or read by the browser. The following sections contain information about this tag, including an example of it in use and browser compatibility.
Example of a comment in HTML
Hey, I'm a paragraph with some text in me.
Example result
Hey, I’m a paragraph with some text in me.
- Example of a comment in HTML
- Example result
- Compatibility
- Related information
Compatibility
Browser, Compatibility, HTML !DOCTYPE, Nonexecutable statement, Paragraph, Web design terms
Related information
- How to view the HTML source code of a web page.
- Is it possible to make the HTML source not viewable?
- HTML and web design help and support.