Copyright © tutorialspoint.com

HTML <comment> and <!--...--> tags



Advertisements

Function:

The HTML <comment> tag allows authors to comment their HTML code. This tag is supported by IE only.

It is recommended to use <!--....--> to comment your tags. This tag is compatible to all browsers.

Difference between HTML and XHTML:

NONE

Example:

<p>Following is a comment in Netscape</p>
<comment>This is Commented line in IE</comment> <!-- This is also a commented line -->

This will produce following result in IE:

Following is a comment in Netscape

This is Commented line in IE

Online Practice:

To Become more comfortable - Do Online Practice


Copyright © tutorialspoint.com