The Developers Choice!!!!
                                                                                                            Home | About Us | Contact Us


Lecture10 : Comments

What is HTML Comment

HTML Comment is define as <!-- and --> which are used to insert comments in HTML code.

How to use HTML Comment

You can add comments to your HTML source by using the following syntax:
<!-- You can write comment inside -->
Comments are not displayed by the browser, but comment can help document your HTML.
With comments you can place notifications and reminders in your HTML tags:

<!-- This is a comment body -->
<p>This is a paragraph.</p>
<!-- Comments are not displayed in Client site*-->

* Client site :
All Browser like Google Chrome, Mozilla, Internet Explorer are called client site

<!-- Comments are not displayed in client site <img border="0" src="/logo/logo.png" alt="Project Code Logo" width="112" height="100">-->

What is Conditional Comments
Conditional Comment is use for defining condition between two parameters.
<!--[if IE 8]> .... some HTML here .... <![endif]-->

How to implement HTML Comment

Example :
<!DOCTYPE html>

<!-- This is a comment -->
<p>This is a paragraph.</p>
<!-- Comments are not displayed in the browser -->


Output :

This is a paragraph.

All Rights Reserved with Project code