HTML | <!–…–> Tag

The HTML <!–…–> Tag is used to insert comments in the HTML code. It is a good practice of coding so that the coder and the reader can get help to understand the code. It is helpful to understand the complex code. The comment tag is useful during the debugging of codes.

  • It is simple piece of code which is wiped off (ignore) by web browsers i.e, not displayed by browser.
  • It helps the coder and reader to understand the piece of code used for specially in complex source code.

Syntax:

<!-- Comments here -->

Examples:



filter_none

edit
close

play_arrow

link
brightness_4
code

<!DOCTYPE html>
<html>
  
<head>
    <title>
        Single line comment
    </title>
</head>
  
<body>
  
    <!-- Paragraph element -->
    <p>GeeksforGeeks</p>
</body>
  
</html>

chevron_right


Output:

GeeksforGeeks

Supported Browser: The browsers supported by <!– –> tag are listed below:

  • Google Chrome
  • Internet Explorer
  • Firefox
  • Opera
  • Safari

full-stack-img

My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.


Article Tags :
Practice Tags :


Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.