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. CSS comment starts with /* and ends with */.

You can use /* ....*/ to comment multi-line blocks in similar way you do in C and C++ programming languages.

CSS Example:

    <!DOCTYPE html>
<html>
<head>
<style>
p {  
  color: blue;  
  /* This is a single-line comment */  
  text-align: center;  
}   
/* This is  
a multi-line  
comment */  
</style>
</head>
<body>
<p>CSS comments are ignored by the browsers and not shown in the output.</p>
</body>
</html>
Try it with the Editor