Open Source Projects
HTML comments are used to make document note, or remove a piece of code. Comments are not displayed. Following is an example of a comment.
<!-- this is a single line comment -->
<!-- this is a
To comment out piece of HTML code from the web page enclose it inside the comment tag.
<p>This is a sample paragraph.</p>
<p>This is a paragraph.</p>
<p>This is another paragraph.</p>
This is a sample paragraph.
This is another paragraph.
This works only for Internet Explorer on Windows and is used to set conditional instruction. Following is an example.
<!--[if lt IE 9]>
If IE version is less than 9 then HTML inside the comment will be used else ignored.
We can also comment out style using the comment tag.
Have fun learning :-)
Copyright © 2014 - 2018 DYclassroom. All rights reserved.
rendered in 0.0397 sec