CSS Comments
CSS Comments: Generally, comments in CSS are used to describe our code. Further, it will provide support to many users who are concerned with the code. Somewhat, these are ignored by the browsers.
CSS comments can be multiple or one line statements. These comments begin with /* and close with */. The following example is helpful for understanding this concept:
Example:
<!DOCTYPE html> <html> <head> <style> /* Single Line Comment Example */ h1 { color: maroon; } </style> </head> <body> <h1> This is an example of single line comment </h1> <p> It has maroon color </p> <p> Above comment line will not be visible </p> </body> </html>
Output:

We can insert the comments inside the code whenever we want:
Example:
<!DOCTYPE html> <html> <head> <style> h1 { color: green; /* This is green*/ } </style> </head> <body> <h1> Example of CSS Comments </h1> <p> It has green color </p> <p> Above comment will not be visible </p> </body> </html>
Output:

Also, CSS comments can span numerous lines:
Example:
<!DOCTYPE html> <html> <head> <style> /* This is a multi-line comment */ body { background-color: lightblue; } h1 { color: maroon; } </style> </head> <body> <h1> Example of Multi-Line Comments </h1> <p> It has lightblue background color </p> <p> Above comment will not be visible </p> </body> </html>
Output:
