TRENDING TOPICS

×

What is the HTML comments tag?

By: AK Shukla | 18 May 2019

A

Alka Patel

21 August 2019

The HTML comment is used to ignore a piece of HTML code being render in a web browser, simply if you want to hide some HTML content then you can comment that content, but note that this is not a way to hide something secret because commented HTML content can be seen in source code of webpage by end-user. 

there are two things one is <comment> tag and another thing is a <!-- ..... --> tag to hide code.

<comment> Tag 

<comment> tag is supported by only a few browsers like IE, it is not recommended to use, so try to not use <comment> tag.

<comment>t tag has both opening and closing tags, see below example.

<comment><p>This paragraph is commented</p></comment>

<!-- ... --> Tag 

This <!-- ... --> is most widely used and supported by the web browsers, it is very easy to use, just type all HTML content between <!-- opening and --> closing tags, like below line. 

<!-- content goges here -->, see below example

<!-- <p>This paragraph is commented</p> -->

1 votes

P

priyanka pidurkar

03 December 2019

<!---->

1 votes

S

Sunita Verma

18 August 2019

The HTML comment tag is used to ignore a piece of HTML code being display on a web page. Commented codes are visible in source code but they are not rendered in the web page.

0 votes

Your Answer

Advertise With Us

We offer sponsored posts and guest posts with do-follow links, back-links, and other advertising services, To advertise email us at "advertise@gdatamart.com"

© 2021 GDATAMART.COM (All Rights Reserved)