Ad

CSS Comment

A CSS Comment is the text that are not rendered and ignored by the browser. It is used to explain the code, and helpful when you edit the source code later. It also help the other programmer to understand the code easily.

Syntax

Comments can be placed anywhere inside the code, there is no limit to add comments. It can be used in single line, or in multiple lines. It is begin with the characters "/*" and end with the characters "*/"

/* anything writen in inside it, is a part of comment. */
/* One line comment */
/* A comment can be applied in multiple lines.
like this, 
this is also a part to comment. */

Comments are used for documentation, disable some specific css styling. There is no other way to specify comments in CSS external style sheets.

Example: CSS Comment

.class{
    color:red;
    /*
      font-size:30px;
      margin:25px;
    */
}

In the above code, font-size and margin property will not be executed, they are marked as comment, only color will appear.