CSS Comment

CSS Comment

CSS Comment basically something in a CSS document that is completely ignored by the browser. This means even if you will write the comment on your CSS page either on them anywhere in the CSS file so it will not be reflected as the output in the browser. Because comments’ purpose is to give the information to your colleagues. CSS Comment can help you to understand the styling of the HTML code of other persons.

For example, I’m a web designer in a company and I have written some CSS style for designing the HTML code and after someday, I come back for some changing/redesign the web pages or some other employees will come for the redesign of the same web page and required some editing in the CSS that I have designed. So the comments will help him out why I have put some particular style or whatever I have done. I can actually keep on explaining for whatever I’m doing while designing a web page inside the comments so it will be basically a good practice to write comments.

When you are working on big documents it will, in fact, help you also out after a few days like today I created a very big document maybe after some time I’ll forget something about it. I can go there again I can read the comments and I will get my information back.

CSS Comment Tag

A CSS Comment is started with /*  and the comment close with  */ . These are the CSS Comment tag that is used to add the comment in the CSS documents.

CSS Comment Code Example

/* This is a single-line comment */
p {
  color: red;
}
/* This is
a multi-line
comment */

p {
  color: red;
}

If you want to learn more about CSS visit the official website: Visit

css comment

visit the CSS tutorial list. And make strong your CSS concept. Click here. wuschools.com is always written about the CSS concept for the CSS lover. Ang writes about how CSS makes your life easy if you are a web site developer. We help you to continue your learning.

Leave a Reply