HTML Comment Tag
Tags | Description |
---|---|
<!– –> | This tag is used to comment HTML elements. |
Syntax
Note: Commented elements are not displayed in the browser. However, comments allow you to add additional information to the source code, which can help you read or understand your HTML source code document later.
Examples
HTML Comment
Bangladesh is an independent country.
Output
Bangladesh is an independent country.
Conditional comments
You can also use conditional comments within HTML:
You can specify tags in comments as an alternative to tags that are not supported in the Internet Explorer browser. This will ensure that the tags in the comments are displayed correctly when these codes are run in the Internet Explorer browser.
Chapter summary
<!-- -->
Used to comment HTML elements.- Comments are used to set elements for Internet Explorer.