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.

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

Output: -

You May Also Like:- 

  • '+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.