5/4/21

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

<html>
<head>
<title> Example of CSS Syntax </title>
<style> 
h1{             
/* 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;
}
</style>
</head>
<body>
<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>
</div>
</body>
</html>

Output: -




"+y+""}else{if(A==5){c+='
  • '+w+""+y+"
  • "}else{if(A==6){c+='
  • "+w+'
    '+u+""+y+"
  • "}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]); //]]>

    0 comments:

    Post a Comment

    Follow on Twitter

    Linkedin

    Categories

    Contact Form

    Name

    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: "d e n a c c 9 7 7 (at) g m a i l (dot) c o m" (delete spaces) or you can find and buy it on Afternic domain auctions.