FANDOM


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:

<!-- Comment -->

Everything inserted between <!-- and --> will not be displayed on the web page. In HTML, the <comment></comment> 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: HTML Comment


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

/* Comment */

Everything inserted between /* and */ will not be displayed.

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

// Comment

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

External Links

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.