How to add comments in the style sheet blocks

JavascriptWeb DevelopmentFront End Scripts

You may need to put additional comments in your stylesheet blocks. Therefore, it is very easy to comment any part of the style sheet. You can simply put your comments inside /*.....this is a comment in style sheet.....*/.

You can use /* ....*/ to comment multi-line blocks in a similar way you do in C and C++ programming languages.

Let us see how to add a comment:

<!DOCTYPE html>
         p {
            color: red;
            /* This is a single-line comment */
            text-align: center;
         /* This is a multi-line comment */
      <p>Hello World!</p>
Updated on 30-Jan-2020 08:44:26