CSS Comments

The comment in CSS begins with the /* characters and ends with */ characters and can take up several lines, its contents do not affect the work of the Code and is ignored by browsers.

Comments can be used to explain some parts of the code, this is especially useful when you have to return to the code after a while.

Another important role of comments, which is often used in practice, is to temporarily disable some part of the code. In this way, comments are used when it is difficult to locate an error.

/*This is a comment.*/
			
p {
  color:green; /*this property sets the green color of the text*/
}

/* 
  This is
  Multiline
  Comment
*/
Note: nested comments are not supported, so you cannot attach one comment to another. This error can occur, for example, when you need to temporarily disable some of the code, and it already contains a comment:
...
/*
p {
  color: red; /* the color of the text in paragraphs is red */
  background-color: black;
}
*/
...
Copying materials from this site is possible only with the permission of the site administration and
when you specify a direct active link to the source.
2011-2018 © puzzleweb.ru

puzinfo@puzzleweb.ru | ruen