CSS comments are used to include notes or explanations in your CSS code. They are not displayed on the web page and are meant for developers who read or maintain the CSS code.
CSS comments are written between /*
and */
. Example:
/* This is a CSS comment */
Here are examples of different types of comments in CSS:
/* This is a single-line comment */
body {
background-color: #f0f0f0; /* This is an inline comment */
}
/* This is a
multi-line comment */
h1 {
color: blue;
}
Inspect the source code to view the comments.