HTML | Comments

html comments

Comments:

HTML comments are fairly simple to include in your document, as they have a simple format. A comment in your document might resemble the following:

<!– This is a comment –>

Anything after    <  !–    until the closing    –>    will not be displayed. It can still be seen in the source code for  the document, but it is not shown onscreen.

CDATA sections:

Larger comments can make use of CDATA structures — structures created for other markup specifications but enabled in most user agents for XML, as well as HTML (XHTML), rendering.Hence, CDATA is used often for commenting large sections of code in HTML documents.The format of the CDATA tagisasfollows:

<![CDATA[ Commented text goes here ]]>

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s