5/4/21

CSS Tutorials - CSS Syntax with Example

CSS Syntax 

A CSS style sheet consists of a set of instructions that is interpreted by the web browser and after interpreted by the web browser instructions are applied to the corresponding elements. Such as - paragraph, heading, div, etc. 

The CSS Syntax Rule is made of three major parts:-

  • Selectors: - A Selector is an html tag on which the CSS Style Sheet will be applied. Like :- <h1>, <p>, <span> etc.
  • Property: - A property is a type of attribute of the Html elements. Such as Color, border, etc. 
  • Value: - Value is assigned on the CSS Property. Such as Color is the property and red is the value which is assigned to the color attribute. 

Syntax of CSS


Let us see through with a simple example.

<html>
<head>
<title> Example of CSS Syntax </title>
<style> 
h1{
color: Red;
background-color: Yellow;
}
p{
color: Yellow;
background-color: green;
}
</style>
</head>
<body>
<h1> This is a Heading. </h1>
<p> This is a Paragraph. </p>
</body>
</html>

Output: -


You May Also Like:- 



"+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.