HTML COMMENT
HTML comment is used to make a comment in an HTML document.
HTML comment is ignored by the browser. Anything written as a comment is not taken under consideration.
Anything written in between <!-- and --> is considered a comment.
Example:
Example
Use of comment
In large HTML documents it is good to use comments for future convenience.
Example
Correct way to add comment
There are something that we need to take care while creating comment:
- Comments should not be nested inside any other comment.
- There should not be two continuous dash like --.
- There should be no gap in dash(-) and exclamation mark(!).
Example
Example
Multiline comment in HTML
Multiline comments span multiple lines where the line starts with <-- and ends with -->.
Example