Comments

Comments are a type of coded text that do not appear visually on the webpage, but can be seen when the source code is viewed. They are typically used to show advice or hints, or to tell readers something important. It is used in HTML and CSS but each type of comment is different.

In HTML, this is how a comment is written:

Everything inserted between  and   will not be displayed on the web page. In HTML, the  element can also be used to insert a comment into a document. The usage of this element is not recommended as it has been considered as an obsolete element since HTML 2.0.

This is what an HTML comment looks like in the source code:

In CSS and JavaScript, this is how a comment should be written:

Everything inserted between  and   will not be displayed.

In JavaScript, a comment could also be written like this:

Note: The comment above should be used in one line.