In HTML, comments are used to include information within the code that is not displayed when the web page is rendered in a browser. Comments can be useful for providing notes to developers, explaining code sections, or temporarily disabling code. HTML comments are enclosed between
-->. Here’s how you can use HTML comments:
HTML Comment Example
Welcome to My Website
This is a paragraph of text.
This div has a light blue background for emphasis.
Keep in mind that comments are not visible on the rendered web page, but they can be viewed by inspecting the HTML source code. Comments are a valuable tool for making your code more understandable and for leaving notes for yourself and other developers who may work on the same project.