CSS Comments


The statements in your CSS code that the compiler ignores and doesn't execute are known as comments. The code is explained via comments. They improve the program's readability and comprehension.

A comment may be one or more lines long. Both single-line and multiline comments can be made using the /*  */ comment syntax. For earlier browsers, we can hide using the syntax <!- ->, however this is no longer advised. It's a good idea to include comments in your code because they can make it easier to understand if someone reads it or if it's later reviewed.

Syntax

Example

Preview