In CSS, comments are used to add annotations or explanations to code. They are ignored by the browser and have no effect on the display of the website. Comments are added by placing the characters /* at the beginning of the comment and */ at the end. Anything between these characters is considered a comment. For example:
/* This is a comment */ /* This is a multi-line comment */
You can also use
// for a single-line comment in some preprocessors like scss
//This is a single line comment
It’s a good idea to use comments to explain the purpose of complex code or to identify sections of code that relate to specific parts of the webpage.