CSS Comments

A comment in CSS is used as an aid in debug. Anything between the /* and */ in ignored by the browser. It is takes as a comment.

A single like comment starts with //

The example below shows the single line and multi line comment. The commenting system in CSS is similar to the common programming language including C and javascript.

<style type="text/css">
/* color:blue;
multi line comment */

<h1 class="blue">Center-aligned heading</h1>
<p class="blue">Center-aligned paragraph.</p> 

You can try this code using online tool here

As an exercise, try to un comment the last single line comment and comment the line


And see its effect.

In the next page we will check some real life CSS styles. Make sure you are familar with them.