Loading...
Loading...
00:00:00

Comment in HTML

HTML comments are used to add notes or explanations to the source code of a web page that are not displayed to the user. They are useful for documenting your code, providing explanations or reminders to yourself or other developers who may be working on the code, or for temporarily hiding parts of the code while testing and debugging.

To write a comment in HTML, you start with the <!-- characters, followed by your comment text, and end with the --> characters.

Here's an example:

<!-- This is a comment in HTML -->

It's important to note that comments can only be used within the HTML document and not within the head or any other sections of the document.