CSS Comments

CSS Comments
CSS Comments

Comments are used to explain the code, and may help when you edit the source code at a later date.

Comments are ignored by browsers.

A CSS comment starts with /* and ends with */:

Example

/* This is a single-line comment */
p {
  color: red;
}

You can add comments wherever you want in the code:

Example

p {
  color: red;  /* Set text color to red */
}

Comments can also span multiple lines: 

Example

/* This is
a multi-line
comment */
p {
  color: red;
}