HTML Comments
In HTML, you can use comments to include explanatory notes or annotations within your code. Comments are not displayed in the browser when the page is rendered and are intended for developers or anyone reviewing the code.
Single-line Comments:
- Single-line comments are created using the <!-- --> syntax.
Example
<!-- This is a single-line comment --; <p>This is my webpage.</p> <!-- Comments are not displayed in the browser -->You can click on above box to edit the code and run again.
Output
This is my webpage
multi-line Comments:
- Multi-line comments can span multiple lines and are also enclosed in <!--and -->