Introduction:

In this article we are going to explain how to comment CSS code with example.

Description:  

CSS comments provide easy ways to add information to a CSS document. It is very helpful for the users who reads your code so that they can easily understand the code.

Comments are ignored by browsers. Comments are single or multiple lines statement and

written within /*...... code here......*/.

Example:

<!DOCTYPE html>
<html>
<head>
    <style>
        p {
            color: blue;
            /* This is a single-line comment */
            text-align: center;
        }
        /* This is
        a multi-line
        comment */
    </style>
</head>
<body>
    <p>Hi sqltutorialspoint.com</p>
    <p>This statement is styled with CSS.</p>
    <p>CSS comments are ignored by the browsers and not shown in the output.</p>
</body>
</html>   

 

Output: 

  how to apply single or multi line comment in css code 

 

 I hope this article will help to you after reading.

0 comments


Leave a comment

Make sure you enter the (*) required information where indicated. HTML code is not allowed.

You may also like