View video tutorial

HTML <!----> Tag.

HTML

HTML Comment helps programmers to document source code.

Comments help programmers.


Comments are the notes for the code of its purpose.

Comments are not displayed when the page is rendered.

It is useful to understand the code function or objective after a long time.

In production comments are deleted.

Comment tags do not support any attributes.

<!-- This is an HTML comment -->
<p>Welcome <!-- to --> w3context. Comments are the notes for the code of its purpose.</p>
<!-- Comments are not displayed in the browser -->

Learning with HTML Editor "Try it Now"

You can edit the HTML code and view the result using online editor.

Example

<!DOCTYPE html>
<html>
<head>
    <title>HTML Comment Example</title>
</head>
<body>
    <h2>HTML Comment Example</h2>
    <!-- This is an HTML comment -->
    <p>Welcome <!-- to --> w3context. Comments are the notes for the code of its purpose.
    </p>
    <!-- Comments are not displayed in the browser -->
</body>
</html>
Try it Now »

Click on the "Try it Now" button to see how it works.