Home >Web Front-end >CSS Tutorial >How to add comments in css
It only takes two steps to add comments in CSS: use the comment symbols /* or // to enter the comment content between the comment symbols
How to add comments in CSS
The method of adding comments in CSS is very simple. There are two steps:
Step 1: Use the comment symbol
CSS comments can use two comment symbols:
/*
and */
: multi-line comments//
: Single line comment Step 2: Comment content
Enter your comment content between the comment symbols. For multi-line comments, you can write your comment across multiple lines, while for single-line comments, your comment should be completed within a single line.
Example:
Multi-line comments:
<code class="css">/* 这是一个多行注释。 它可以跨多行。 */</code>
Single-line comments:
<code class="css">// 这是一个单行注释。</code>
Comment Type
The Importance of Comments
CSS comments are very important because they can help:
The above is the detailed content of How to add comments in css. For more information, please follow other related articles on the PHP Chinese website!