Comment Tags are used to insert comments in the HTML.Comments are not displayed on the web pages on the browser.But this can help the developer or programmer when the developer has to modify HTML source code.Comments are also helped while testing HTML page because you can comment out HTML lines of code, one at a time, to search for errors.
You can add Comments in your HTML source code by using the following syntax:
We use an exclamation mark in the opening tag but not in the close tag.
Example:
You can also use comment tag directly into other HTML tags without using additional comment tags.
Example:
Html Source code:
Paragraph Tag
Output here:-
Important Note: The text or things within the Comment tags will not be display on web pages.
Comment Below!
You can add Comments in your HTML source code by using the following syntax:
We use an exclamation mark in the opening tag but not in the close tag.
Example:
This is Paragraph
You can also use comment tag directly into other HTML tags without using additional comment tags.
Example:
Html Source code:
Heading1
Output here:-
Important Note: The text or things within the Comment tags will not be display on web pages.
Comment Below!