CSS Tutorials - CSS Comments with Example.

 CSS Comments

Comments are added to the source code to easily understand the code. It helps the other developer or programmer to understand the code (written by another developer) easily. Just like Html, comments are also written in CSS. 

There are two types of comments in CSS: -

  • Single Line Comments: - These types of comments written only in one line. 
  • Multi Line Comments: - These types of comments are written in one or more lines.

Note :- Comments are ignored by the browser and would not be display as output. 

Example of Comments

<title> Example of CSS Syntax </title>
/* This style is given to the heading tag only they didn't work on paragraph tag. */
color: Red;
background-color: Yellow;
text-align: center;
p {          
        /* This style is given to the 
                        paragraph tag only 
                        they didn't work on heading tag. 

color: Yellow;
background-color: green;
text-align: center;
<h1> This is a Heading. </h1>
<p> This is a Paragraph. </p>
<div class="container">
    <p> This is a paragraph tag under the div. </p>

Output: -

  • '+w+""+y+"
  • "}else{if(A==6){c+='
  • "+w+'
  • "}else{c+='
  • "+w+"
  • "}}}}}s.innerHTML=c+=""+y;d.callBack()};randomRelatedIndex=h;showRelatedPost=g;j(d.homePage.replace(/\/$/,"")+"/feeds/posts/summary"+e+"?alt=json-in-script&orderby=updated&max-results=0&callback=randomRelatedIndex")})(window,document,document.getElementsByTagName("head")[0]); //]]>


    Post a Comment

    Like us on facebook

    blogger templatesblogger widgets

    Follow on Twitter



    Contact Form


    Email *

    Message *

    Mad About Computer. Powered by Blogger.
    This site is in no way affiliated with or endorsed by specified business. It exists as a compendium of supporting information intended for informational purposes only. If you want to buy this website, please don't hesitate to contact us via e-mail: domain (dot) sales (dot) org @ gmail (dot) com or you can find and buy it on Afternic domain auctions.