You are currently viewing How do you Insert a Comment in a CSS file?
  • Post category:CSS

How do you Insert a Comment in a CSS file?

Insert a Comment in a CSS file.

In this article, we will learn about how do you insert CSS comment in a file?

The CSS comments can be used for a variety of things that can be used to make notes for yourself. In CSS multi line and single-line comments are the same. The opening tag of the comment is “/*” symbol and the end tag comment is “*/” symbol.

syntax:

/* Comments are here */

Example of insert CSS comment

/* Creating div box*/
div{
  border : 2px solid black;
  width : 100px;
  height : 100px;
}

In the above code, we have created a box. If normally the users see they think, why this code? But now they can understand this code is for creating a box. So, the comment is useful for something like this.

Leave a Reply